Free stale summaries in ipa-pure-const
authorJan Hubicka <jh@suse.cz>
Thu, 22 Oct 2020 04:34:48 +0000 (06:34 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 22 Oct 2020 04:34:48 +0000 (06:34 +0200)
* ipa-pure-const.c (funct_state_summary_t::insert): Free stale
summaries.

gcc/ipa-pure-const.c

index 1af3206056e493b9a35ce793e6944c1f40fd1689..70930a5eac05da2acf670f7fb445ea42fd3bd8cb 100644 (file)
@@ -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.  */