Pass context pointers to LiveRangeCalc::reset().

Remove the same pointers from all the other LiveRangeCalc functions,
simplifying the interface.

llvm-svn: 157941
This commit is contained in:
Jakob Stoklund Olesen
2012-06-04 18:21:16 +00:00
parent 3ee0405231
commit 5ef0e0b262
3 changed files with 45 additions and 55 deletions

View File

@@ -345,9 +345,11 @@ void SplitEditor::reset(LiveRangeEdit &LRE, ComplementSpillMode SM) {
Values.clear();
// Reset the LiveRangeCalc instances needed for this spill mode.
LRCalc[0].reset(&VRM.getMachineFunction());
LRCalc[0].reset(&VRM.getMachineFunction(), LIS.getSlotIndexes(), &MDT,
&LIS.getVNInfoAllocator());
if (SpillMode)
LRCalc[1].reset(&VRM.getMachineFunction());
LRCalc[1].reset(&VRM.getMachineFunction(), LIS.getSlotIndexes(), &MDT,
&LIS.getVNInfoAllocator());
// We don't need an AliasAnalysis since we will only be performing
// cheap-as-a-copy remats anyway.
@@ -924,11 +926,9 @@ bool SplitEditor::transferValues() {
DEBUG(dbgs() << '\n');
}
LRCalc[0].calculateValues(LIS.getSlotIndexes(), &MDT,
&LIS.getVNInfoAllocator());
LRCalc[0].calculateValues();
if (SpillMode)
LRCalc[1].calculateValues(LIS.getSlotIndexes(), &MDT,
&LIS.getVNInfoAllocator());
LRCalc[1].calculateValues();
return Skipped;
}
@@ -953,8 +953,7 @@ void SplitEditor::extendPHIKillRanges() {
if (Edit->getParent().liveAt(LastUse)) {
assert(RegAssign.lookup(LastUse) == RegIdx &&
"Different register assignment in phi predecessor");
LRC.extend(LI, End,
LIS.getSlotIndexes(), &MDT, &LIS.getVNInfoAllocator());
LRC.extend(LI, End);
}
}
}
@@ -1004,8 +1003,7 @@ void SplitEditor::rewriteAssigned(bool ExtendRanges) {
} else
Idx = Idx.getRegSlot(true);
getLRCalc(RegIdx).extend(LI, Idx.getNextSlot(), LIS.getSlotIndexes(),
&MDT, &LIS.getVNInfoAllocator());
getLRCalc(RegIdx).extend(LI, Idx.getNextSlot());
}
}