summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-24 20:30:21 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-24 20:30:21 +0000
commitfff4a6c8d21c1da1775b2de3608754eff478f360 (patch)
treefb085630166aa196f47f51404bc1b7f3f2c51098 /gcc/ipa-prop.c
parent39e522ee9f918ad56054a68db20d0b212dc31fc7 (diff)
downloadgcc-fff4a6c8d21c1da1775b2de3608754eff478f360.tar.gz
* ipa-utils.h (polymorphic_call_context): Add
metdhos dump, debug and clear_outer_type. (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Simplify. (ipa_polymorphic_call_context::clear_outer_type): New method. * ipa-prop.c (ipa_analyze_call_uses): Do not overwrite offset. * ipa-devirt.c (types_odr_comparable): New function. (types_must_be_same_for_odr): New function. (odr_subtypes_equivalent_p): Simplify. (possible_placement_new): Break out from ... (ipa_polymorphic_call_context::restrict_to_inner_type): ... here; be more cuatious about returning false in cases the context may be valid in derived type or via placement new. (contains_type_p): Clear maybe_derived_type (ipa_polymorphic_call_context::dump): New method. (ipa_polymorphic_call_context::debug): New method. (ipa_polymorphic_call_context::set_by_decl): Cleanup comment. (ipa_polymorphic_call_context::set_by_invariant): Simplify. (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Simplify. (possible_polymorphic_call_targets): Trust context.restrict_to_inner_class to suceed on all valid cases; remove confused sanity check. (dump_possible_polymorphic_call_targets): Simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215569 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 9c7aaf7b899..b65a1e21493 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2357,7 +2357,8 @@ ipa_analyze_call_uses (struct func_body_info *fbi, gimple call)
if (context.get_dynamic_type (instance,
OBJ_TYPE_REF_OBJECT (target),
- otr_type, call))
+ otr_type, call)
+ && context.offset == cs->indirect_info->offset)
{
gcc_assert (TREE_CODE (otr_type) == RECORD_TYPE);
cs->indirect_info->polymorphic = true;