aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-10-03 21:52:11 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-10-03 19:52:11 +0000
commitf9bb202b35f949eecb48adf75f9a0c5b117978d2 (patch)
tree985ae03907469842ffadf25aece38775da66d63a /gcc/cgraph.c
parent8a5b2f56c4c9d80c8ac2c31c82304681f4e9da80 (diff)
downloadgcc-f9bb202b35f949eecb48adf75f9a0c5b117978d2.zip
gcc-f9bb202b35f949eecb48adf75f9a0c5b117978d2.tar.gz
gcc-f9bb202b35f949eecb48adf75f9a0c5b117978d2.tar.bz2
cgraph.h (struct indirect_call_info): Add IN_POLYMORPHIC_CDTOR
* 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. From-SVN: r215871
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index fdcaf79..a46e188 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -819,6 +819,12 @@ symbol_table::create_edge (cgraph_node *caller, cgraph_node *callee,
edge->indirect_inlining_edge = 0;
edge->speculative = false;
edge->indirect_unknown_callee = indir_unknown_callee;
+ if (flag_devirtualize && call_stmt && DECL_STRUCT_FUNCTION (caller->decl))
+ edge->in_polymorphic_cdtor
+ = decl_maybe_in_construction_p (NULL, NULL, call_stmt,
+ caller->decl);
+ else
+ edge->in_polymorphic_cdtor = caller->thunk.thunk_p;
if (call_stmt && caller->call_site_hash)
cgraph_add_edge_to_call_site_hash (edge);
@@ -1033,6 +1039,7 @@ cgraph_edge::make_speculative (cgraph_node *n2, gcov_type direct_count,
else
e2->can_throw_external = can_throw_external;
e2->lto_stmt_uid = lto_stmt_uid;
+ e2->in_polymorphic_cdtor = in_polymorphic_cdtor;
count -= e2->count;
frequency -= e2->frequency;
symtab->call_edge_duplication_hooks (this, e2);