[llvm-commits] [llvm] r115708 - /llvm/trunk/lib/CodeGen/SplitKit.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Oct 5 16:10:05 PDT 2010
Author: stoklund
Date: Tue Oct 5 18:10:04 2010
New Revision: 115708
URL: http://llvm.org/viewvc/llvm-project?rev=115708&view=rev
Log:
dupli always has an interval now.
Modified:
llvm/trunk/lib/CodeGen/SplitKit.cpp
Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=115708&r1=115707&r2=115708&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Oct 5 18:10:04 2010
@@ -798,6 +798,7 @@
/// instructions using curli to use the new intervals.
void SplitEditor::rewrite() {
assert(!openli_.getLI() && "Previous LI not closed before rewrite");
+ assert(dupli_.getLI() && "No dupli for rewrite. Noop spilt?");
// First we need to fill in the live ranges in dupli.
// If values were redefined, we need a full recoloring with SSA update.
@@ -863,23 +864,19 @@
break;
}
}
- if (LI) {
- MO.setReg(LI->reg);
- sa_.removeUse(MI);
- DEBUG(dbgs() << " rewrite " << Idx << '\t' << *MI);
- }
+ MO.setReg(LI->reg);
+ sa_.removeUse(MI);
+ DEBUG(dbgs() << " rewrite " << Idx << '\t' << *MI);
}
// dupli_ goes in last, after rewriting.
- if (dupli_.getLI()) {
- if (dupli_.getLI()->empty()) {
- DEBUG(dbgs() << " dupli became empty?\n");
- lis_.removeInterval(dupli_.getLI()->reg);
- dupli_.reset(0);
- } else {
- dupli_.getLI()->RenumberValues(lis_);
- intervals_.push_back(dupli_.getLI());
- }
+ if (dupli_.getLI()->empty()) {
+ DEBUG(dbgs() << " dupli became empty?\n");
+ lis_.removeInterval(dupli_.getLI()->reg);
+ dupli_.reset(0);
+ } else {
+ dupli_.getLI()->RenumberValues(lis_);
+ intervals_.push_back(dupli_.getLI());
}
// Calculate spill weight and allocation hints for new intervals.
More information about the llvm-commits
mailing list