diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-16 19:08:28 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-16 19:08:28 +0000 |
commit | 5597e838f7b917b37cfa6a67aa7dfdf8ca27d6f3 (patch) | |
tree | 9b06e2e22ecbd6a108d20722105738f6a5224db0 /gcc/ipa-prop.c | |
parent | 7fa0478e0eb2d5b03525ba85e9204a0a7ec558c0 (diff) | |
parent | e8cac2b9823644a05253133cdf23067a8f7d6669 (diff) | |
download | gcc-5597e838f7b917b37cfa6a67aa7dfdf8ca27d6f3.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@206028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index a28ab55097b..50632c780a4 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -560,6 +560,8 @@ stmt_may_be_vtbl_ptr_store (gimple stmt) { if (is_gimple_call (stmt)) return false; + else if (gimple_clobber_p (stmt)) + return false; else if (is_gimple_assign (stmt)) { tree lhs = gimple_assign_lhs (stmt); @@ -2022,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); @@ -2050,8 +2061,7 @@ ipa_analyze_stmt_uses (struct cgraph_node *node, struct ipa_node_params *info, passed in DATA. */ static bool -visit_ref_for_mod_analysis (gimple stmt ATTRIBUTE_UNUSED, - tree op, void *data) +visit_ref_for_mod_analysis (gimple, tree op, tree, void *data) { struct ipa_node_params *info = (struct ipa_node_params *) data; |