mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 18:33:22 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da75f7277e
commit
f88e4c8e91
@ -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…
x
Reference in New Issue
Block a user