Teach LiveIntervals how to verify themselves and start using it in some

of the trick merge routines. This adds a layer of testing that was
necessary when implementing more efficient (and complex) merge logic for
this datastructure.

No functionality changed here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2012-07-10 05:06:03 +00:00
parent a4fba5eaf8
commit 261b633089
2 changed files with 42 additions and 0 deletions

View File

@@ -489,6 +489,15 @@ namespace llvm {
void print(raw_ostream &OS) const;
void dump() const;
/// \brief Walk the interval and assert if any invariants fail to hold.
///
/// Note that this is a no-op when asserts are disabled.
#ifdef NDEBUG
void verify() const {}
#else
void verify() const;
#endif
private:
Ranges::iterator addRangeFrom(LiveRange LR, Ranges::iterator From);