mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
Fix build bots.
Avoid looking at the operands of a potentially erased instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97769fcdd1
commit
067fcb4087
@ -1441,10 +1441,10 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
|||||||
// Now erase all the redundant copies.
|
// Now erase all the redundant copies.
|
||||||
for (unsigned i = 0, e = DeadCopies.size(); i != e; ++i) {
|
for (unsigned i = 0, e = DeadCopies.size(); i != e; ++i) {
|
||||||
MachineInstr *MI = DeadCopies[i];
|
MachineInstr *MI = DeadCopies[i];
|
||||||
DEBUG(dbgs() << "\t\terased:\t" << LIS->getInstructionIndex(MI)
|
|
||||||
<< '\t' << *MI);
|
|
||||||
if (!ErasedInstrs.insert(MI))
|
if (!ErasedInstrs.insert(MI))
|
||||||
continue;
|
continue;
|
||||||
|
DEBUG(dbgs() << "\t\terased:\t" << LIS->getInstructionIndex(MI)
|
||||||
|
<< '\t' << *MI);
|
||||||
LIS->RemoveMachineInstrFromMaps(MI);
|
LIS->RemoveMachineInstrFromMaps(MI);
|
||||||
MI->eraseFromParent();
|
MI->eraseFromParent();
|
||||||
}
|
}
|
||||||
@ -1453,6 +1453,8 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
|||||||
for (SmallVector<MachineInstr*, 8>::iterator I = DupCopies.begin(),
|
for (SmallVector<MachineInstr*, 8>::iterator I = DupCopies.begin(),
|
||||||
E = DupCopies.end(); I != E; ++I) {
|
E = DupCopies.end(); I != E; ++I) {
|
||||||
MachineInstr *MI = *I;
|
MachineInstr *MI = *I;
|
||||||
|
if (!ErasedInstrs.insert(MI))
|
||||||
|
continue;
|
||||||
|
|
||||||
// We have pretended that the assignment to B in
|
// We have pretended that the assignment to B in
|
||||||
// A = X
|
// A = X
|
||||||
@ -1462,8 +1464,6 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
|
|||||||
// A = X
|
// A = X
|
||||||
unsigned Src = MI->getOperand(1).getReg();
|
unsigned Src = MI->getOperand(1).getReg();
|
||||||
SourceRegisters.push_back(Src);
|
SourceRegisters.push_back(Src);
|
||||||
if (!ErasedInstrs.insert(MI))
|
|
||||||
continue;
|
|
||||||
LIS->RemoveMachineInstrFromMaps(MI);
|
LIS->RemoveMachineInstrFromMaps(MI);
|
||||||
MI->eraseFromParent();
|
MI->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user