From 74605a11f3c482656558d332058870d15cc718d5 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 8 May 2011 21:14:24 +0200 Subject: cgraph.c (cgraph_clone_node): Add call_duplication_hook parameter. * cgraph.c (cgraph_clone_node): Add call_duplication_hook parameter. (cgraph_create_virtual_clone): Call hooks once virtual clone is finished. * cgraph.h (cgraph_clone_node): Update prototype. * ipa-cp.c (ipcp_estimate_growth): Use estimate_ipcp_clone_size_and_time. * ipa-inline-transform.c (clone_inlined_nodes): Update. * lto-cgraph.c (input_node): Update. * ipa-inline.c (recursive_inlining): Update. * ipa-inline.h (estimate_ipcp_clone_size_and_time): New function. (evaluate_conditions_for_known_args): Break out from ... (evaluate_conditions_for_edge): ... here. (evaluate_conditions_for_ipcp_clone): New function. (inline_node_duplication_hook): Update clone summary based on parameter map. (estimate_callee_size_and_time): Rename to ... (estimate_node_size_and_time): take NODE instead of EDGE; take POSSIBLE_TRUTHS as argument. (estimate_callee_size_and_time): Update. (estimate_ipcp_clone_size_and_time): New function. (do_estimate_edge_time): Update. From-SVN: r173551 --- gcc/cgraphunit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/cgraphunit.c') diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 68eb91d..834acb1 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -430,6 +430,11 @@ verify_edge_count_and_frequency (struct cgraph_edge *e) } if (gimple_has_body_p (e->caller->decl) && !e->caller->global.inlined_to + /* FIXME: Inline-analysis sets frequency to 0 when edge is optimized out. + Remove this once edges are actualy removed from the function at that time. */ + && (e->frequency + || (inline_edge_summary_vec + && !inline_edge_summary (e)->predicate)) && (e->frequency != compute_call_stmt_bb_frequency (e->caller->decl, gimple_bb (e->call_stmt)))) -- cgit v1.1