Provide LiveIntervalUnion::Query::checkLoopInterference.

This is a three-way interval list intersection between a virtual register, a
live interval union, and a loop. It will be used to identify interference-free
loops for live range splitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2010-12-17 04:09:47 +00:00
parent 5d2477cecf
commit ff2e9b4225
5 changed files with 73 additions and 6 deletions

View File

@ -69,13 +69,13 @@ MachineLoopRange::MachineLoopRange(const MachineLoop *loop,
/// overlaps - Return true if this loop overlaps the given range of machine
/// instructions.
bool MachineLoopRange::overlaps(SlotIndex Start, SlotIndex Stop) {
RangeMap::const_iterator I = Intervals.find(Start);
Map::const_iterator I = Intervals.find(Start);
return I.valid() && Stop > I.start();
}
void MachineLoopRange::print(raw_ostream &OS) const {
OS << "Loop#" << Loop->getHeader()->getNumber() << " =";
for (RangeMap::const_iterator I = Intervals.begin(); I.valid(); ++I)
for (Map::const_iterator I = Intervals.begin(); I.valid(); ++I)
OS << " [" << I.start() << ';' << I.stop() << ')';
}