summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-04 00:15:36 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-04 00:15:36 +0000
commit13ba2dab631636e525a44bb259aaea56a860d1c7 (patch)
treea2beff73cfb9b524cd91db7a0860d9a87afe8b7b /lib/CodeGen/SplitKit.h
parentac39bd534be9a8022c09cc8be81db2de109baecb (diff)
downloadllvm-13ba2dab631636e525a44bb259aaea56a860d1c7.tar.gz
llvm-13ba2dab631636e525a44bb259aaea56a860d1c7.tar.bz2
llvm-13ba2dab631636e525a44bb259aaea56a860d1c7.tar.xz
Use an IndexedMap instead of a DenseMap for the live-out cache.
This speeds up updateSSA() so it only accounts for 5% of the live range splitting time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 240f1fecff..29c0afc76c 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -12,7 +12,9 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/IndexedMap.h"
#include "llvm/ADT/IntervalMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/CodeGen/SlotIndexes.h"
@@ -198,7 +200,7 @@ class SplitEditor {
ValueMap Values;
typedef std::pair<VNInfo*, MachineDomTreeNode*> LiveOutPair;
- typedef DenseMap<MachineBasicBlock*,LiveOutPair> LiveOutMap;
+ typedef IndexedMap<LiveOutPair, MBB2NumberFunctor> LiveOutMap;
// LiveOutCache - Map each basic block where a new register is live out to the
// live-out value and its defining block.
@@ -217,6 +219,10 @@ class SplitEditor {
// by all the new registers because at most one is live out of each block.
LiveOutMap LiveOutCache;
+ // LiveOutSeen - Indexed by MBB->getNumber(), a bit is set for each valid
+ // entry in LiveOutCache.
+ BitVector LiveOutSeen;
+
/// defValue - define a value in RegIdx from ParentVNI at Idx.
/// Idx does not have to be ParentVNI->def, but it must be contained within
/// ParentVNI's live range in ParentLI. The new value is added to the value