mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Avoid dereferencing end() in collectInterferingVRegs() when there is no
interference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af24964251
commit
8d12140437
@ -250,6 +250,7 @@ namespace llvm {
|
||||
/// position is in a hole, this method returns an iterator pointing to the
|
||||
/// LiveRange immediately after the hole.
|
||||
iterator advanceTo(iterator I, SlotIndex Pos) {
|
||||
assert(I != end());
|
||||
if (Pos >= endIndex())
|
||||
return end();
|
||||
while (I->end <= Pos) ++I;
|
||||
|
@ -238,7 +238,7 @@ collectInterferingVRegs(unsigned MaxInterferingRegs) {
|
||||
InterferenceResult IR = firstInterference();
|
||||
LiveInterval::iterator VirtRegEnd = VirtReg->end();
|
||||
LiveInterval *RecentInterferingVReg = NULL;
|
||||
while (IR.LiveUnionI.valid()) {
|
||||
if (IR.VirtRegI != VirtRegEnd) while (IR.LiveUnionI.valid()) {
|
||||
// Advance the union's iterator to reach an unseen interfering vreg.
|
||||
do {
|
||||
if (IR.LiveUnionI.value() == RecentInterferingVReg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user