mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
LiveVariables should clear kill / dead markers first. This allows us to remove a hack in the scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -556,17 +556,21 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) {
|
||||
if (MI->isPHI())
|
||||
NumOperandsToProcess = 1;
|
||||
|
||||
// Clear kill and dead markers. LV will recompute them.
|
||||
SmallVector<unsigned, 4> UseRegs;
|
||||
SmallVector<unsigned, 4> DefRegs;
|
||||
for (unsigned i = 0; i != NumOperandsToProcess; ++i) {
|
||||
const MachineOperand &MO = MI->getOperand(i);
|
||||
MachineOperand &MO = MI->getOperand(i);
|
||||
if (!MO.isReg() || MO.getReg() == 0)
|
||||
continue;
|
||||
unsigned MOReg = MO.getReg();
|
||||
if (MO.isUse())
|
||||
if (MO.isUse()) {
|
||||
MO.setIsKill(false);
|
||||
UseRegs.push_back(MOReg);
|
||||
if (MO.isDef())
|
||||
} else /*MO.isDef()*/ {
|
||||
MO.setIsDead(false);
|
||||
DefRegs.push_back(MOReg);
|
||||
}
|
||||
}
|
||||
|
||||
// Process all uses.
|
||||
|
Reference in New Issue
Block a user