mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
TargetInstrInfo::commuteInstruction() doesn't actually return a new instruction
unless it was requested to with an optional parameter that defaults to false, so we don't need to handle that case in TwoAddressInstructionPass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
abafaba4d5
commit
1ea93c79bc
@ -581,19 +581,9 @@ commuteInstruction(MachineBasicBlock::iterator &mi,
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(dbgs() << "2addr: COMMUTED TO: " << *NewMI);
|
DEBUG(dbgs() << "2addr: COMMUTED TO: " << *NewMI);
|
||||||
// If the instruction changed to commute it, update livevar.
|
assert(NewMI == MI &&
|
||||||
if (NewMI != MI) {
|
"TargetInstrInfo::commuteInstruction() should not return a new "
|
||||||
if (LV)
|
"instruction unless it was requested.");
|
||||||
// Update live variables
|
|
||||||
LV->replaceKillInstruction(RegC, MI, NewMI);
|
|
||||||
if (LIS)
|
|
||||||
LIS->ReplaceMachineInstrInMaps(MI, NewMI);
|
|
||||||
|
|
||||||
MBB->insert(mi, NewMI); // Insert the new inst
|
|
||||||
MBB->erase(mi); // Nuke the old inst.
|
|
||||||
mi = NewMI;
|
|
||||||
DistanceMap.insert(std::make_pair(NewMI, Dist));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update source register map.
|
// Update source register map.
|
||||||
unsigned FromRegC = getMappedReg(RegC, SrcRegMap);
|
unsigned FromRegC = getMappedReg(RegC, SrcRegMap);
|
||||||
|
Loading…
Reference in New Issue
Block a user