diff options
author | Jan Hubicka <jh@suse.cz> | 2011-05-08 21:14:24 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-05-08 19:14:24 +0000 |
commit | 74605a11f3c482656558d332058870d15cc718d5 (patch) | |
tree | bacaa437c56da65959eaf4a81ceee12d963848df /gcc/ipa-cp.c | |
parent | 5c04950727f2a7a0e00c07776a417f24aea7da9a (diff) | |
download | gcc-74605a11f3c482656558d332058870d15cc718d5.zip gcc-74605a11f3c482656558d332058870d15cc718d5.tar.gz gcc-74605a11f3c482656558d332058870d15cc718d5.tar.bz2 |
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
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index d22e709..41046d1 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1102,7 +1102,8 @@ ipcp_estimate_growth (struct cgraph_node *node) call site. Precise cost is difficult to get, as our size metric counts constants and moves as free. Generally we are looking for cases that small function is called very many times. */ - growth = inline_summary (node)->self_size + estimate_ipcp_clone_size_and_time (node, &growth, NULL); + growth = growth - removable_args * redirectable_node_callers; if (growth < 0) return 0; |