mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 17:38:39 +00:00
If MI is deleted then remove it from the set. If a new MI is created, it could
have the same address as the one we deleted, and we don't want that in the set yet. Noticed by inspection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ea3abd5536
commit
dec1b10161
@ -433,6 +433,7 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
if (MCID.isBitcast()) {
|
if (MCID.isBitcast()) {
|
||||||
if (OptimizeBitcastInstr(MI, MBB)) {
|
if (OptimizeBitcastInstr(MI, MBB)) {
|
||||||
// MI is deleted.
|
// MI is deleted.
|
||||||
|
LocalMIs.erase(MI);
|
||||||
Changed = true;
|
Changed = true;
|
||||||
MII = First ? I->begin() : llvm::next(PMII);
|
MII = First ? I->begin() : llvm::next(PMII);
|
||||||
continue;
|
continue;
|
||||||
@ -440,6 +441,7 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
} else if (MCID.isCompare()) {
|
} else if (MCID.isCompare()) {
|
||||||
if (OptimizeCmpInstr(MI, MBB)) {
|
if (OptimizeCmpInstr(MI, MBB)) {
|
||||||
// MI is deleted.
|
// MI is deleted.
|
||||||
|
LocalMIs.erase(MI);
|
||||||
Changed = true;
|
Changed = true;
|
||||||
MII = First ? I->begin() : llvm::next(PMII);
|
MII = First ? I->begin() : llvm::next(PMII);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user