aboutsummaryrefslogtreecommitdiff
path: root/gcc/symbol-summary.h
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-06-08 14:31:09 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-06-08 12:31:09 +0000
commit9fb50ad822bd57786b12a2fc90c61032c519a621 (patch)
tree167105a5677e1cdfe7a5f9f9b37b02b13340a447 /gcc/symbol-summary.h
parent1ac2bdb45faaa455afcb3b77eb824dde429c27fb (diff)
downloadgcc-9fb50ad822bd57786b12a2fc90c61032c519a621.zip
gcc-9fb50ad822bd57786b12a2fc90c61032c519a621.tar.gz
gcc-9fb50ad822bd57786b12a2fc90c61032c519a621.tar.bz2
Port edge_growth_cache to call_summary.
2018-06-08 Martin Liska <mliska@suse.cz> * ipa-inline-analysis.c (inline_edge_removal_hook): Remove. (initialize_growth_caches): Remove. (free_growth_caches): Likewise. (do_estimate_edge_time): Use edge_growth_cache. (do_estimate_edge_size): Likewise. (do_estimate_edge_hints): Likewise. * ipa-inline.c (reset_edge_caches): Likewise. (recursive_inlining): Likewise. (inline_small_functions): Likewise. * ipa-inline.h (initialize_growth_caches): Remove. (estimate_edge_size): Likewise. (estimate_edge_time): Likewise. (estimate_edge_hints): Likewise. (reset_edge_growth_cache): Likewise. * symbol-summary.h (call_summary::remove): New method. From-SVN: r261318
Diffstat (limited to 'gcc/symbol-summary.h')
-rw-r--r--gcc/symbol-summary.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/symbol-summary.h b/gcc/symbol-summary.h
index 4896c97..12e5020 100644
--- a/gcc/symbol-summary.h
+++ b/gcc/symbol-summary.h
@@ -384,6 +384,18 @@ public:
return get (hashable_uid (edge), false);
}
+ /* Remove edge from summary. */
+ void remove (cgraph_edge *edge)
+ {
+ int uid = hashable_uid (edge);
+ T **v = m_map.get (uid);
+ if (v)
+ {
+ m_map.remove (uid);
+ release (*v);
+ }
+ }
+
/* Return number of elements handled by data structure. */
size_t elements ()
{