diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-14 03:47:17 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-14 03:47:17 +0000 |
commit | bc42c20ce3b3d2bc564e96f0951dddc26a0084cd (patch) | |
tree | d263aa4b3c8e49114fabaca0cafcda95de3c39a4 /gcc/ipa-inline-analysis.c | |
parent | 02a3b1979c7b4262cc350163355ed67a69faf971 (diff) | |
download | gcc-bc42c20ce3b3d2bc564e96f0951dddc26a0084cd.tar.gz |
PR ipa/64481
* ipa-inline-analysis.c (node_growth_cache): Remove.
(initialize_growth_caches): Do not initialize it.
(free_growth_caches): Do not free it.
(do_estimate_growth): Rename to ...
(estimate_growth): ... this one; drop growth cache code.
(growth_likely_positive): Always go the heuristics way.
* ipa-inline.c (can_inline_edge_p): Walk through aliases.
(reset_edge_caches): Do not reset node growth.
(heap_edge_removal_hook): Do not maintain cache.
(inline_small_functions): Likewise; strenghten sanity check.
(ipa_inline): Do not maintain caches.
* ipa-inline.h (node_growth_cache): Remove.
(do_estimate_growth): Remove to ...
(estimate_growth): this one; remove inline version.
(reset_node_growth_cache): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219572 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index ec91d8ec9af..02b756e8566 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -167,7 +167,6 @@ function_summary <inline_summary *> *inline_summaries; vec<inline_edge_summary_t> inline_edge_summary_vec; /* Cached node/edge growths. */ -vec<int> node_growth_cache; vec<edge_growth_cache_entry> edge_growth_cache; /* Edge predicates goes here. */ @@ -1341,8 +1340,6 @@ initialize_growth_caches (void) { if (symtab->edges_max_uid) edge_growth_cache.safe_grow_cleared (symtab->edges_max_uid); - if (symtab->cgraph_max_uid) - node_growth_cache.safe_grow_cleared (symtab->cgraph_max_uid); } @@ -1352,7 +1349,6 @@ void free_growth_caches (void) { edge_growth_cache.release (); - node_growth_cache.release (); } @@ -3931,7 +3927,7 @@ do_estimate_growth_1 (struct cgraph_node *node, void *data) /* Estimate the growth caused by inlining NODE into all callees. */ int -do_estimate_growth (struct cgraph_node *node) +estimate_growth (struct cgraph_node *node) { struct growth_data d = { node, 0, false }; struct inline_summary *info = inline_summaries->get (node); @@ -3960,12 +3956,6 @@ do_estimate_growth (struct cgraph_node *node) + 50) / 100; } - if (node_growth_cache.exists ()) - { - if ((int) node_growth_cache.length () <= node->uid) - node_growth_cache.safe_grow_cleared (symtab->cgraph_max_uid); - node_growth_cache[node->uid] = d.growth + (d.growth >= 0); - } return d.growth; } @@ -3979,7 +3969,6 @@ bool growth_likely_positive (struct cgraph_node *node, int edge_growth ATTRIBUTE_UNUSED) { int max_callers; - int ret; struct cgraph_edge *e; gcc_checking_assert (edge_growth > 0); @@ -3999,10 +3988,6 @@ growth_likely_positive (struct cgraph_node *node, int edge_growth ATTRIBUTE_UNUS || !node->can_remove_if_no_direct_calls_p ()) return true; - /* If there is cached value, just go ahead. */ - if ((int)node_growth_cache.length () > node->uid - && (ret = node_growth_cache[node->uid])) - return ret > 0; if (!node->will_be_removed_from_program_if_no_direct_calls_p () && (!DECL_COMDAT (node->decl) || !node->can_remove_if_no_direct_calls_p ())) |