mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
- Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged. That is, it only update the VarInfo.kills if the new instruction is known to have the correct dead and kill markers.
- CommuteInstruction copies kill / dead markers over to new instruction. So use replaceKillInstruction instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -375,10 +375,9 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
DOUT << "2addr: COMMUTED TO: " << *NewMI;
|
||||
// If the instruction changed to commute it, update livevar.
|
||||
if (NewMI != mi) {
|
||||
if (LV) {
|
||||
if (LV)
|
||||
// Update live variables
|
||||
LV->instructionChanged(mi, NewMI);
|
||||
}
|
||||
LV->replaceKillInstruction(regC, mi, NewMI);
|
||||
|
||||
mbbi->insert(mi, NewMI); // Insert the new inst
|
||||
mbbi->erase(mi); // Nuke the old inst.
|
||||
|
||||
Reference in New Issue
Block a user