forked from OSchip/llvm-project
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. llvm-svn: 224061
This commit is contained in:
parent
63eb6bf623
commit
d6f8e4b03c
|
@ -107,8 +107,6 @@ void ilist_traits<MachineInstr>::addNodeToList(MachineInstr *N) {
|
|||
// 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>::removeNodeFromList(MachineInstr *N) {
|
|||
N->RemoveRegOperandsFromUseLists(MF->getRegInfo());
|
||||
|
||||
N->setParent(nullptr);
|
||||
|
||||
LeakDetector::addGarbageObject(N);
|
||||
}
|
||||
|
||||
/// transferNodesFromList (MI) - When moving a range of instructions from one
|
||||
|
|
Loading…
Reference in New Issue