From: Jan Hubicka Date: Thu, 22 Oct 2020 04:34:48 +0000 (+0200) Subject: Free stale summaries in ipa-pure-const X-Git-Tag: basepoints/gcc-12~4051 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5d9706f95378d40a8895616e167614b69dfe70a;p=thirdparty%2Fgcc.git Free stale summaries in ipa-pure-const * ipa-pure-const.c (funct_state_summary_t::insert): Free stale summaries. --- diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 1af3206056e4..70930a5eac05 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. */