mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Properly deal with empty intervals when checking for interference.
llvm-svn: 121319
This commit is contained in:
parent
e270068021
commit
ffc0f6586a
@ -111,9 +111,10 @@ void LiveIntervalUnion::verify(LiveVirtRegBitSet& VisitedVRegs) {
|
||||
// Assumes that segments are sorted by start position in both
|
||||
// LiveInterval and LiveSegments.
|
||||
void LiveIntervalUnion::Query::findIntersection(InterferenceResult &IR) const {
|
||||
|
||||
// Search until reaching the end of the LiveUnion segments.
|
||||
LiveInterval::iterator VirtRegEnd = VirtReg->end();
|
||||
if (IR.VirtRegI == VirtRegEnd)
|
||||
return;
|
||||
while (IR.LiveUnionI.valid()) {
|
||||
// Slowly advance the live virtual reg iterator until we surpass the next
|
||||
// segment in LiveUnion.
|
||||
|
@ -173,6 +173,7 @@ unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg,
|
||||
// Found an available register.
|
||||
return PhysReg;
|
||||
}
|
||||
assert(!VirtReg.empty() && "Empty VirtReg has interference");
|
||||
LiveInterval *interferingVirtReg =
|
||||
Queries[interfReg].firstInterference().liveUnionPos().value();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user