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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-04-02 06:03:35 +00:00
parent a122eaaee2
commit 5907d86365
5 changed files with 304 additions and 1 deletions

View File

@@ -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(); }