From bc42c20ce3b3d2bc564e96f0951dddc26a0084cd Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 14 Jan 2015 03:47:17 +0000 Subject: 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 --- gcc/ipa-inline.h | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'gcc/ipa-inline.h') diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index a71510315ae..ea7cb092709 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -224,7 +224,6 @@ struct edge_growth_cache_entry inline_hints hints; }; -extern vec node_growth_cache; extern vec edge_growth_cache; /* In ipa-inline-analysis.c */ @@ -245,7 +244,7 @@ void estimate_ipcp_clone_size_and_time (struct cgraph_node *, vec, vec, int *, int *, inline_hints *); -int do_estimate_growth (struct cgraph_node *); +int estimate_growth (struct cgraph_node *); bool growth_likely_positive (struct cgraph_node *, int); void inline_merge_summary (struct cgraph_edge *edge); void inline_update_overall_summary (struct cgraph_node *node); @@ -274,21 +273,6 @@ inline_edge_summary (struct cgraph_edge *edge) return &inline_edge_summary_vec[edge->uid]; } -/* Return estimated unit growth after inlning all calls to NODE. - Quick accesors to the inline growth caches. - For convenience we keep zero 0 as unknown. Because growth - can be both positive and negative, we simply increase positive - growths by 1. */ -static inline int -estimate_growth (struct cgraph_node *node) -{ - int ret; - if ((int)node_growth_cache.length () <= node->uid - || !(ret = node_growth_cache[node->uid])) - return do_estimate_growth (node); - return ret - (ret > 0); -} - /* Return estimated size of the inline sequence of EDGE. */ @@ -342,16 +326,6 @@ estimate_edge_hints (struct cgraph_edge *edge) return ret - 1; } - -/* Reset cached value for NODE. */ - -static inline void -reset_node_growth_cache (struct cgraph_node *node) -{ - if ((int)node_growth_cache.length () > node->uid) - node_growth_cache[node->uid] = 0; -} - /* Reset cached value for EDGE. */ static inline void -- cgit v1.2.1