mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Properly deal with empty intervals when checking for interference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
045869c12a
commit
9b0c4f8af3
@ -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…
x
Reference in New Issue
Block a user