From 0ece94384582605f64f5b90e79cfd561f9269c5f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 17 Jul 2008 23:49:46 +0000 Subject: Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks. Fix a leak that this turned up in LowerSubregs.cpp. And, comment a leak in LiveIntervalAnalysis.cpp. llvm-svn: 53746 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp') diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 4f79696d00c..8c99831de18 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1585,9 +1585,9 @@ addIntervalsForSpills(const LiveInterval &li, if (ReMatDefMI && isReMaterializable(li, VNI, ReMatDefMI, dummy)) { // Remember how to remat the def of this val#. ReMatOrigDefs[VN] = ReMatDefMI; - // Original def may be modified so we have to make a copy here. vrm must - // delete these! - ReMatDefs[VN] = ReMatDefMI = mf_->CloneMachineInstr(ReMatDefMI); + // Original def may be modified so we have to make a copy here. + // FIXME: This is a memory leak. vrm should delete these! + ReMatDefs[VN] = mf_->CloneMachineInstr(ReMatDefMI); bool CanDelete = true; if (VNI->hasPHIKill) { -- cgit v1.2.3