diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-20 03:57:12 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-20 03:57:12 +0000 |
| commit | 64d82b74dd16213bc58ba9feed846760df0bfe5f (patch) | |
| tree | a2f0d120f5379828d5a9f4d78df2dde52f61a761 /llvm/lib | |
| parent | 02d83e3b8b7467523e1cd30a4b9cc95453739c61 (diff) | |
| download | bcm5719-llvm-64d82b74dd16213bc58ba9feed846760df0bfe5f.tar.gz bcm5719-llvm-64d82b74dd16213bc58ba9feed846760df0bfe5f.zip | |
Fix build bots.
Avoid looking at the operands of a potentially erased instruction.
llvm-svn: 157146
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index c7dcde6c225..f529f1899ca 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -1441,10 +1441,10 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) { // Now erase all the redundant copies. for (unsigned i = 0, e = DeadCopies.size(); i != e; ++i) { MachineInstr *MI = DeadCopies[i]; - DEBUG(dbgs() << "\t\terased:\t" << LIS->getInstructionIndex(MI) - << '\t' << *MI); if (!ErasedInstrs.insert(MI)) continue; + DEBUG(dbgs() << "\t\terased:\t" << LIS->getInstructionIndex(MI) + << '\t' << *MI); LIS->RemoveMachineInstrFromMaps(MI); MI->eraseFromParent(); } @@ -1453,6 +1453,8 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) { for (SmallVector<MachineInstr*, 8>::iterator I = DupCopies.begin(), E = DupCopies.end(); I != E; ++I) { MachineInstr *MI = *I; + if (!ErasedInstrs.insert(MI)) + continue; // We have pretended that the assignment to B in // A = X @@ -1462,8 +1464,6 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) { // A = X unsigned Src = MI->getOperand(1).getReg(); SourceRegisters.push_back(Src); - if (!ErasedInstrs.insert(MI)) - continue; LIS->RemoveMachineInstrFromMaps(MI); MI->eraseFromParent(); } |

