]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Free RTL SSA after late-combine
authorRichard Biener <rguenther@suse.de>
Mon, 9 Dec 2024 13:10:34 +0000 (14:10 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 9 Dec 2024 14:20:00 +0000 (15:20 +0100)
Late-combine fails to release RTL SSA info, leaking memory
(as -fmem-report shows).

* late-combine.cc (late_combine::execute): Delete RTL SSA.

gcc/late-combine.cc

index 1311f76f4431b6b0acd22ffc736c54b1ac1f0fda..d3587bc78da142b314b10be71b2cc9117fdba0f7 100644 (file)
@@ -730,6 +730,10 @@ late_combine::execute (function *fn)
   // Finalization.
   if (crtl->ssa->perform_pending_updates ())
     cleanup_cfg (0);
+
+  delete crtl->ssa;
+  crtl->ssa = nullptr;
+
   // Make the recognizer allow volatile MEMs again.
   init_recog ();
   free_dominance_info (CDI_DOMINATORS);