mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 00:35:30 +00:00
Fix PR3845: Avoid stale MachineInstruction pointer reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9f16bcb59f
commit
78a5bd5dbd
@ -513,8 +513,6 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
||||
int SPAdj = 0; // SP offset due to call frame setup / destroy.
|
||||
if (RS) RS->enterBasicBlock(BB);
|
||||
for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) {
|
||||
MachineInstr *MI = I;
|
||||
|
||||
if (I->getOpcode() == TargetInstrInfo::DECLARE) {
|
||||
// Ignore it.
|
||||
++I;
|
||||
@ -545,8 +543,8 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
||||
continue;
|
||||
}
|
||||
|
||||
MachineInstr *MI = I;
|
||||
bool DoIncr = true;
|
||||
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
||||
if (MI->getOperand(i).isFI()) {
|
||||
// Some instructions (e.g. inline asm instructions) can have
|
||||
|
Loading…
x
Reference in New Issue
Block a user