summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-02 06:03:35 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-02 06:03:35 +0000
commit91cbcaf95790c719d74cd034a19030d63b37eae3 (patch)
treec221b7e8d60dc36ae36418140ec61a7b8ae6b48b /llvm/include
parent36171288ce69743f28126831036d3dd672d13653 (diff)
downloadbcm5719-llvm-91cbcaf95790c719d74cd034a19030d63b37eae3.tar.gz
bcm5719-llvm-91cbcaf95790c719d74cd034a19030d63b37eae3.zip
Add an InterferenceCache class for caching per-block interference ranges.
When the greedy register allocator is splitting multiple global live ranges, it tends to look at the same interference data many times. The InterferenceCache class caches queries for unaltered LiveIntervalUnions. llvm-svn: 128764
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ADT/IntervalMap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h
index 79f24d31c06..f28ebf3b9a5 100644
--- a/llvm/include/llvm/ADT/IntervalMap.h
+++ b/llvm/include/llvm/ADT/IntervalMap.h
@@ -1328,6 +1328,10 @@ public:
/// const_iterator - Create an iterator that isn't pointing anywhere.
const_iterator() : map(0) {}
+ /// setMap - Change the map iterated over. This call must be followed by a
+ /// call to goToBegin(), goToEnd(), or find()
+ void setMap(const IntervalMap &m) { map = const_cast<IntervalMap*>(&m); }
+
/// valid - Return true if the current position is valid, false for end().
bool valid() const { return path.valid(); }
OpenPOWER on IntegriCloud