summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-05 17:40:28 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-05 17:40:28 +0000
commit1986ca43c0202400738d554cbc6c268a7c009a4c (patch)
tree2798c6a743942ce9aae14e3e6423cb4e162dcdea /gcc/ipa-prop.c
parent77cab4753e1206a8a5246f9989b7427990ca0e06 (diff)
downloadgcc-1986ca43c0202400738d554cbc6c268a7c009a4c.tar.gz
* ipa-polymorphic-call.c (possible_placement_new): Fix condition
on size. (ipa_polymorphic_call_context::restrict_to_inner_type): Do not walk into vptr pointer. (ipa_polymorphic_call_context::dump): Fix formating. (walk_ssa_copies): Add logic avoiding loops; update uses. * ipa-prop.c (ipa_analyze_call_uses): Compute vptr_changed. * g++.dg/ipa/devirt-42.C: Update template. * g++.dg/ipa/devirt-44.C: Update template. * g++.dg/ipa/devirt-45.C: Update template. * g++.dg/ipa/devirt-46.C: Update template. * g++.dg/ipa/devirt-47.C: Update template. * g++.dg/ipa/devirt-48.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215902 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 80acdcc21bb..743ea805b6d 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2371,9 +2371,10 @@ ipa_analyze_call_uses (struct func_body_info *fbi, gimple call)
gcc_checking_assert (cs->indirect_info->otr_token
== tree_to_shwi (OBJ_TYPE_REF_TOKEN (target)));
- context.get_dynamic_type (instance,
- OBJ_TYPE_REF_OBJECT (target),
- obj_type_ref_class (target), call);
+ cs->indirect_info->vptr_changed
+ = !context.get_dynamic_type (instance,
+ OBJ_TYPE_REF_OBJECT (target),
+ obj_type_ref_class (target), call);
cs->indirect_info->context = context;
}
@@ -3263,7 +3264,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie,
{
if (!possible_polymorphic_call_target_p (ie, cgraph_node::get_create (target)))
{
- if (!speculative)
+ if (speculative)
return NULL;
target = ipa_impossible_devirt_target (ie, target);
}