From 91bdaf659d23be61d1fa5c83ef02322bf0872c87 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 9 Dec 2024 14:10:34 +0100 Subject: [PATCH] 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. --- 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); -- 2.47.2