diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-01-16 20:17:05 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-01-16 20:17:05 +0000 |
commit | 3b02cbe75224d91899e91a7688cac3052be4e516 (patch) | |
tree | eb7b7d8a604a52504186837a02b9cef22ce644bd /lib/CodeGen/RegAllocLinearScan.cpp | |
parent | 1893a05b28bf03e0ded1ed651cc1d71c7854ad93 (diff) |
Fold open interval ends handling into
LiveIntervals::Interval::expiredAt() and simplify regalloc code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index a88c55dd52..abd1390093 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -428,11 +428,8 @@ void RA::processActiveIntervals(IntervalPtrs::value_type cur) DEBUG(std::cerr << "\tprocessing active intervals:\n"); for (IntervalPtrs::iterator i = active_.begin(); i != active_.end();) { unsigned reg = (*i)->reg; - // remove expired intervals. we expire earlier because this if - // an interval expires this is going to be the last use. in - // this case we can reuse the register for a def in the same - // instruction - if ((*i)->expiredAt(cur->start() + 1)) { + // remove expired intervals + if ((*i)->expiredAt(cur->start())) { DEBUG(std::cerr << "\t\tinterval " << **i << " expired\n"); if (reg >= MRegisterInfo::FirstVirtualRegister) { reg = v2pMap_[reg]; @@ -465,11 +462,8 @@ void RA::processInactiveIntervals(IntervalPtrs::value_type cur) for (IntervalPtrs::iterator i = inactive_.begin(); i != inactive_.end();) { unsigned reg = (*i)->reg; - // remove expired intervals. we expire earlier because this if - // an interval expires this is going to be the last use. in - // this case we can reuse the register for a def in the same - // instruction - if ((*i)->expiredAt(cur->start() + 1)) { + // remove expired intervals + if ((*i)->expiredAt(cur->start())) { DEBUG(std::cerr << "\t\t\tinterval " << **i << " expired\n"); // remove from inactive i = inactive_.erase(i); |