diff mbox series

Free RTL SSA after late-combine

Message ID 20241209131318.782ED3858282@sourceware.org
State New
Headers show
Series Free RTL SSA after late-combine | expand

Commit Message

Richard Biener Dec. 9, 2024, 1:12 p.m. UTC
Late-combine fails to release RTL SSA info, leaking memory
(as -fmem-report shows).

Bootstrap and regtest running on x86_64-unknown-linux-gnu, OK?

Thanks,
Richard.

	* late-combine.cc (late_combine::execute): Delete RTL SSA.
---
 gcc/late-combine.cc | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/gcc/late-combine.cc b/gcc/late-combine.cc
index 1311f76f443..d3587bc78da 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);