diff options
author | Andrew Trick <atrick@apple.com> | 2010-11-09 19:47:51 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2010-11-09 19:47:51 +0000 |
commit | 42d50e920bc1b86b120a963b26c4c4f96b5e4372 (patch) | |
tree | 4806b38d7375d2436c3a3c8a591e92fc7c423a66 /llvm/lib/CodeGen/LiveIntervalUnion.cpp | |
parent | e56c786f113508c37c05518a1df5531d5f6df96f (diff) | |
download | bcm5719-llvm-42d50e920bc1b86b120a963b26c4c4f96b5e4372.tar.gz bcm5719-llvm-42d50e920bc1b86b120a963b26c4c4f96b5e4372.zip |
Reverting r118604. Windows build broke.
llvm-svn: 118613
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalUnion.cpp | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp index 9d4de6a7c24..ec502cd51ec 100644 --- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp +++ b/llvm/lib/CodeGen/LiveIntervalUnion.cpp @@ -15,7 +15,6 @@ #define DEBUG_TYPE "regalloc" #include "LiveIntervalUnion.h" -#include "llvm/ADT/SparseBitVector.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> @@ -74,9 +73,12 @@ void LiveIntervalUnion::unify(LiveInterval &lvr) { #ifndef NDEBUG // check for overlap (inductively) if (segPos != segments_.begin()) { - assert(prior(segPos)->end <= segment.start && "overlapping segments" ); + SegmentIter prevPos = segPos; + --prevPos; + assert(prevPos->end <= segment.start && "overlapping segments" ); } - SegmentIter nextPos = next(segPos); + SegmentIter nextPos = segPos; + ++nextPos; if (nextPos != segments_.end()) assert(segment.end <= nextPos->start && "overlapping segments" ); #endif // NDEBUG @@ -96,49 +98,6 @@ void LiveIntervalUnion::extract(const LiveInterval &lvr) { } } -raw_ostream& llvm::operator<<(raw_ostream& os, const LiveSegment &ls) { - return os << '[' << ls.start << ',' << ls.end << ':' << - ls.liveVirtReg->reg << ")"; -} - -void LiveSegment::dump() const { - dbgs() << *this << "\n"; -} - -void -LiveIntervalUnion::print(raw_ostream &os, - const AbstractRegisterDescription *rdesc) const { - os << "LIU "; - if (rdesc != NULL) - os << rdesc->getName(repReg_); - else { - os << repReg_; - } - for (SegmentIter segI = segments_.begin(), segEnd = segments_.end(); - segI != segEnd; ++segI) { - dbgs() << " " << *segI; - } - os << "\n"; -} - -void LiveIntervalUnion::dump(const AbstractRegisterDescription *rdesc) const { - print(dbgs(), rdesc); -} - -#ifndef NDEBUG -// Verify the live intervals in this union and add them to the visited set. -void LiveIntervalUnion::verify(LvrBitSet& visitedVRegs) { - SegmentIter segI = segments_.begin(); - SegmentIter segEnd = segments_.end(); - if (segI == segEnd) return; - visitedVRegs.set(segI->liveVirtReg->reg); - for (++segI; segI != segEnd; ++segI) { - visitedVRegs.set(segI->liveVirtReg->reg); - assert(prior(segI)->end <= segI->start && "overlapping segments" ); - } -} -#endif //!NDEBUG - // Private interface accessed by Query. // // Find a pair of segments that intersect, one in the live virtual register |