PostRASched: Convert physreg def/use tracking to Jakob's SparseSet.

Added array subscript to SparseSet for convenience.
Slight reorg to make it easier to manage the def/use sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2012-02-23 01:52:38 +00:00
parent f19a5926cb
commit 81a682a4c0
3 changed files with 115 additions and 88 deletions

View File

@@ -213,6 +213,13 @@ public:
return std::make_pair(end() - 1, true);
}
/// array subscript - If an element already exists with this key, return it.
/// Otherwise, automatically construct a new value from Key, insert it,
/// and return the newly inserted element.
ValueT &operator[](unsigned Key) {
return *insert(ValueT(Key)).first;
}
/// erase - Erases an existing element identified by a valid iterator.
///
/// This invalidates all iterators, but erase() returns an iterator pointing