https://gcc.gnu.org/g:91bdaf659d23be61d1fa5c83ef02322bf0872c87

commit r15-6045-g91bdaf659d23be61d1fa5c83ef02322bf0872c87
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Dec 9 14:10:34 2024 +0100

    Free RTL SSA after late-combine
    
    Late-combine fails to release RTL SSA info, leaking memory
    (as -fmem-report shows).
    
            * late-combine.cc (late_combine::execute): Delete RTL SSA.

Diff:
---
 gcc/late-combine.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/late-combine.cc b/gcc/late-combine.cc
index 1311f76f4431..d3587bc78da1 100644
--- a/gcc/late-combine.cc
+++ b/gcc/late-combine.cc
@@ -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);

Reply via email to