diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-07 23:18:47 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-07 23:18:47 +0000 |
commit | 953af2c3c560a13bd5eeb676c128b7e362dca684 (patch) | |
tree | fe75d2d175e04c8ae0606504c1ec48d6f87ffb7d /lib/CodeGen/RegAllocBase.h | |
parent | da2fdcbb639de168738c27089bafa9ca10b731bd (diff) |
Switch LiveIntervalUnion from std::set to IntervalMap.
This speeds up RegAllocBasic by 20%, not counting releaseMemory which becomes
way faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocBase.h')
-rw-r--r-- | lib/CodeGen/RegAllocBase.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocBase.h b/lib/CodeGen/RegAllocBase.h index 8044a192385..32f5e0870ed 100644 --- a/lib/CodeGen/RegAllocBase.h +++ b/lib/CodeGen/RegAllocBase.h @@ -38,6 +38,7 @@ #define LLVM_CODEGEN_REGALLOCBASE #include "llvm/ADT/OwningPtr.h" +#include "LiveIntervalUnion.h" namespace llvm { @@ -69,17 +70,19 @@ class LiveVirtRegQueue; /// live range splitting. LessSpillWeightPriority is provided as a standard /// comparator, but we may add an interface to override it if necessary. class RegAllocBase { + LiveIntervalUnion::Allocator UnionAllocator; protected: // Array of LiveIntervalUnions indexed by physical register. class LiveUnionArray { unsigned NumRegs; - OwningArrayPtr<LiveIntervalUnion> Array; + LiveIntervalUnion *Array; public: - LiveUnionArray(): NumRegs(0) {} + LiveUnionArray(): NumRegs(0), Array(0) {} + ~LiveUnionArray() { clear(); } unsigned numRegs() const { return NumRegs; } - void init(unsigned NRegs); + void init(LiveIntervalUnion::Allocator &, unsigned NRegs); void clear(); |