mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc.
- Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -184,11 +184,8 @@ bool TwoAddressInstructionPass::Sink3AddrInstruction(MachineBasicBlock *MBB,
|
||||
KillMO = MI->findRegisterUseOperand(SavedReg, false, TRI);
|
||||
KillMO->setIsKill(true);
|
||||
|
||||
if (LV) {
|
||||
LiveVariables::VarInfo& VarInfo = LV->getVarInfo(SavedReg);
|
||||
VarInfo.removeKill(KillMI);
|
||||
VarInfo.Kills.push_back(MI);
|
||||
}
|
||||
if (LV)
|
||||
LV->replaceKillInstruction(SavedReg, KillMI, MI);
|
||||
|
||||
// Move instruction to its destination.
|
||||
MBB->remove(MI);
|
||||
@@ -454,10 +451,10 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
// regB is used in this BB.
|
||||
varInfoB.UsedBlocks[mbbi->getNumber()] = true;
|
||||
|
||||
if (LV->removeVirtualRegisterKilled(regB, mbbi, mi))
|
||||
if (LV->removeVirtualRegisterKilled(regB, mi))
|
||||
LV->addVirtualRegisterKilled(regB, prevMi);
|
||||
|
||||
if (LV->removeVirtualRegisterDead(regB, mbbi, mi))
|
||||
if (LV->removeVirtualRegisterDead(regB, mi))
|
||||
LV->addVirtualRegisterDead(regB, prevMi);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user