diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-10-05 19:40:28 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-10-05 17:40:28 +0000 |
commit | 29c43c83ef425cbfd173df483b03b596ddf36570 (patch) | |
tree | 2798c6a743942ce9aae14e3e6423cb4e162dcdea /gcc/ipa-prop.c | |
parent | f50592234cdef68ddc9b98b65a88a443e2c4523f (diff) | |
download | gcc-29c43c83ef425cbfd173df483b03b596ddf36570.zip gcc-29c43c83ef425cbfd173df483b03b596ddf36570.tar.gz gcc-29c43c83ef425cbfd173df483b03b596ddf36570.tar.bz2 |
ipa-polymorphic-call.c (possible_placement_new): Fix condition on size.
* 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.
From-SVN: r215902
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 80acdcc..743ea80 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); } |