mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +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:
@@ -513,8 +513,6 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
|||||||
int SPAdj = 0; // SP offset due to call frame setup / destroy.
|
int SPAdj = 0; // SP offset due to call frame setup / destroy.
|
||||||
if (RS) RS->enterBasicBlock(BB);
|
if (RS) RS->enterBasicBlock(BB);
|
||||||
for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) {
|
for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) {
|
||||||
MachineInstr *MI = I;
|
|
||||||
|
|
||||||
if (I->getOpcode() == TargetInstrInfo::DECLARE) {
|
if (I->getOpcode() == TargetInstrInfo::DECLARE) {
|
||||||
// Ignore it.
|
// Ignore it.
|
||||||
++I;
|
++I;
|
||||||
@@ -545,8 +543,8 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MachineInstr *MI = I;
|
||||||
bool DoIncr = true;
|
bool DoIncr = true;
|
||||||
|
|
||||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
||||||
if (MI->getOperand(i).isFI()) {
|
if (MI->getOperand(i).isFI()) {
|
||||||
// Some instructions (e.g. inline asm instructions) can have
|
// Some instructions (e.g. inline asm instructions) can have
|
||||||
|
Reference in New Issue
Block a user