diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-15 22:19:33 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-15 22:19:33 +0000 |
commit | c41ae25bf35b9561d63ef23e8b01b2803c4af0ca (patch) | |
tree | c2f4cb96b50e92592fd350a911703658f5fa6f7d /gcc/ipa-prop.c | |
parent | bbc2e65d6c86e63b2029ae19aa80e2df7900ce5d (diff) | |
download | gcc-c41ae25bf35b9561d63ef23e8b01b2803c4af0ca.tar.gz |
PR ipa/59265
* ipa-prop.c (ipa_analyze_call_uses): Skip already
devirtualized calls.
g++.dg/torture/pr59265.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206004 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 650e6002b87..a753c040b9e 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2024,8 +2024,17 @@ ipa_analyze_call_uses (struct cgraph_node *node, struct param_analysis_info *parms_ainfo, gimple call) { tree target = gimple_call_fn (call); + struct cgraph_edge *cs; - if (!target) + if (!target + || (TREE_CODE (target) != SSA_NAME + && !virtual_method_call_p (target))) + return; + + /* If we previously turned the call into a direct call, there is + no need to analyze. */ + cs = cgraph_edge (node, call); + if (cs && !cs->indirect_unknown_callee) return; if (TREE_CODE (target) == SSA_NAME) ipa_analyze_indirect_call_uses (node, info, parms_ainfo, call, target); |