summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-03 19:52:11 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-03 19:52:11 +0000
commit007a6c275eb651ed5892d7abf8161e0be8471bca (patch)
tree985ae03907469842ffadf25aece38775da66d63a /gcc/ipa-prop.c
parent82d6b68f0005342a0a2d781dc7d2a8899fbdac9a (diff)
downloadgcc-007a6c275eb651ed5892d7abf8161e0be8471bca.tar.gz
* cgraph.h (struct indirect_call_info): Add IN_POLYMORPHIC_CDTOR
* lto-cgraph.c (lto_output_edge, input_edge): Stream in_polymorphic_cdtor * cgraph.c (symbol_table::create_edge): Compute in_polymorphic_cdtor. (cgraph_edge::make_speculative): Copy in_polymorphic_cdtor. * cgraphclones.c (cgraph_edge::clone): Likewise. * ipa-prop.c (update_jump_functions_after_inlining, try_make_edge_direct_virtual_call): Pass in_polymorphic_cdtor to possible_dynamic_type_change. (decl_maybe_in_construction_p): Allow empty OUTER_TYPE and BASE. (ipa_polymorphic_call_context::possible_dynamic_type_change): Add IN_POLY_CDOTR argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215871 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 5ac5dc5200b..c5bcb3a908f 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2652,7 +2652,7 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs,
/* TODO: Make type preserved safe WRT contexts. */
if (!dst->value.ancestor.agg_preserved)
- ctx.possible_dynamic_type_change ();
+ ctx.possible_dynamic_type_change (e->in_polymorphic_cdtor);
ctx.offset_by (dst->value.ancestor.offset);
if (!ctx.useless_p ())
{
@@ -2722,7 +2722,7 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs,
/* TODO: Make type preserved safe WRT contexts. */
if (!dst->value.ancestor.agg_preserved)
- ctx.possible_dynamic_type_change ();
+ ctx.possible_dynamic_type_change (e->in_polymorphic_cdtor);
if (!ctx.useless_p ())
{
if (!dst_ctx)
@@ -3128,7 +3128,8 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie,
/* TODO: We want to record if type change happens.
Old code did not do that that seems like a bug. */
- ctx.possible_dynamic_type_change (ie->indirect_info->otr_type);
+ ctx.possible_dynamic_type_change (ie->in_polymorphic_cdtor,
+ ie->indirect_info->otr_type);
updated = ie->indirect_info->context.combine_with
(ctx, ie->indirect_info->otr_type);