summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-03 03:41:29 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-03 03:41:29 +0000
commit36d61863bc83bd2301e0224adc560098b35ec0dc (patch)
treef263712c35c5e76d30493c5b80e9bfe9175d2099 /lib/CodeGen/SplitKit.h
parentf27a40a9717c019fd07990483fb475b544bc895e (diff)
downloadllvm-36d61863bc83bd2301e0224adc560098b35ec0dc.tar.gz
llvm-36d61863bc83bd2301e0224adc560098b35ec0dc.tar.bz2
llvm-36d61863bc83bd2301e0224adc560098b35ec0dc.tar.xz
Cache basic block bounds instead of asking SlotIndexes::getMBBRange all the time.
This speeds up the greedy register allocator by 15%. DenseMap is not as fast as one might hope. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 28c5c602d7..240f1fecff 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -71,6 +71,8 @@ public:
///
struct BlockInfo {
MachineBasicBlock *MBB;
+ SlotIndex Start; ///< Beginining of block.
+ SlotIndex Stop; ///< End of block.
SlotIndex FirstUse; ///< First instr using current reg.
SlotIndex LastUse; ///< Last instr using current reg.
SlotIndex Kill; ///< Interval end point inside block.