Fix memory leak in the stackifier, due to the machinebasicblocks not holding
authorChris Lattner <sabre@nondot.org>
Sat, 20 Dec 2003 10:12:17 +0000 (10:12 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 20 Dec 2003 10:12:17 +0000 (10:12 +0000)
instructions on an ilist

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10556 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/FloatingPoint.cpp
lib/Target/X86/X86FloatingPoint.cpp

index 7bc1f728f89515cb9b0f19dd7b916f194a686aad..b89347699653bd058ad59fd80657823644d58c72 100644 (file)
@@ -601,6 +601,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
   }
 
   I = MBB->erase(I)-1;  // Remove the pseudo instruction
+  delete MI;
 }
 
 namespace {
index 7bc1f728f89515cb9b0f19dd7b916f194a686aad..b89347699653bd058ad59fd80657823644d58c72 100644 (file)
@@ -601,6 +601,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
   }
 
   I = MBB->erase(I)-1;  // Remove the pseudo instruction
+  delete MI;
 }
 
 namespace {