diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-01-05 05:05:51 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-01-05 05:05:51 +0000 |
commit | 84be3d5a73313eb19f2f9e0512153cd2e6f46c54 (patch) | |
tree | ec82b39fa7c0b622de7a2194bf3a0d4b5971fe98 /lib/CodeGen/MachineRegisterInfo.cpp | |
parent | f1d015f3429f611c423f943c75f86e6823810dc3 (diff) |
Don't call destructors on MachineInstr and MachineOperand.
The series of patches leading up to this one makes llc -O0 run 8% faster.
When deallocating a MachineFunction, there is no need to visit all
MachineInstr and MachineOperand objects to deallocate them. All their
memory come from a BumpPtrAllocator that is about to be purged, and they
have empty destructors anyway.
This only applies when deallocating the MachineFunction.
DeleteMachineInstr() should still be used to recycle MI memory during
the codegen passes.
Remove the LeakDetector support for MachineInstr. I've never seen it
used before, and now it definitely doesn't work. With this patch, leaked
MachineInstrs would be much less of a problem since all of their memory
will be reclaimed by ~MachineFunction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineRegisterInfo.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/CodeGen/MachineRegisterInfo.cpp b/lib/CodeGen/MachineRegisterInfo.cpp index 9858b4999e..21877e52c2 100644 --- a/lib/CodeGen/MachineRegisterInfo.cpp +++ b/lib/CodeGen/MachineRegisterInfo.cpp @@ -30,12 +30,6 @@ MachineRegisterInfo::MachineRegisterInfo(const TargetRegisterInfo &TRI) } MachineRegisterInfo::~MachineRegisterInfo() { -#ifndef NDEBUG - clearVirtRegs(); - for (unsigned i = 0, e = TRI->getNumRegs(); i != e; ++i) - assert(!PhysRegUseDefLists[i] && - "PhysRegUseDefLists has entries after all instructions are deleted"); -#endif delete [] PhysRegUseDefLists; } |