From d5d9706f95378d40a8895616e167614b69dfe70a Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 22 Oct 2020 06:34:48 +0200 Subject: [PATCH] Free stale summaries in ipa-pure-const * ipa-pure-const.c (funct_state_summary_t::insert): Free stale summaries. --- gcc/ipa-pure-const.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 1af3206056e..70930a5eac0 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1152,6 +1152,9 @@ funct_state_summary_t::insert (cgraph_node *node, funct_state_d *state) new (state) funct_state_d (*a); free (a); } + else + /* Do not keep stale summaries. */ + funct_state_summaries->remove (node); } /* Called when new clone is inserted to callgraph late. */ -- 2.30.2