[llvm] r224061 - CodeGen: Stop using LeakDetector for MachineInstr
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Dec 11 13:51:38 PST 2014
Author: dexonsmith
Date: Thu Dec 11 15:51:37 2014
New Revision: 224061
URL: http://llvm.org/viewvc/llvm-project?rev=224061&view=rev
Log:
CodeGen: Stop using LeakDetector for MachineInstr
Since `MachineInstr` is required to have a trivial destructor, it cannot
remove itself from `LeakDetection`. Remove the calls.
As it happens, this requirement is because `MachineFunction` allocates
all `MachineInstr`s in a custom allocator; when the `MachineFunction` is
destroyed they're dropped of the edge. There's no benefit to detecting
leaks.
Modified:
llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=224061&r1=224060&r2=224061&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Thu Dec 11 15:51:37 2014
@@ -107,8 +107,6 @@ void ilist_traits<MachineInstr>::addNode
// use/def lists.
MachineFunction *MF = Parent->getParent();
N->AddRegOperandsToUseLists(MF->getRegInfo());
-
- LeakDetector::removeGarbageObject(N);
}
/// removeNodeFromList (MI) - When we remove an instruction from a basic block
@@ -122,8 +120,6 @@ void ilist_traits<MachineInstr>::removeN
N->RemoveRegOperandsFromUseLists(MF->getRegInfo());
N->setParent(nullptr);
-
- LeakDetector::addGarbageObject(N);
}
/// transferNodesFromList (MI) - When moving a range of instructions from one
More information about the llvm-commits
mailing list