aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-17 23:49:46 +0000
committerDan Gohman <gohman@apple.com>2008-07-17 23:49:46 +0000
commit8b3b5171b5dd6ae6ec4c305cb16f8c17f5dc9a8e (patch)
tree931e028b14e487fd6d424fd5666f5559ac11e12e /lib/CodeGen/LiveIntervalAnalysis.cpp
parente36d39c5431dffa42167c3fecc5520eb0f2588ce (diff)
downloadexternal_llvm-8b3b5171b5dd6ae6ec4c305cb16f8c17f5dc9a8e.zip
external_llvm-8b3b5171b5dd6ae6ec4c305cb16f8c17f5dc9a8e.tar.gz
external_llvm-8b3b5171b5dd6ae6ec4c305cb16f8c17f5dc9a8e.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 4f79696..8c99831 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/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) {