mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Handle all live physreg defs in the same place.
SelectionDAG has 4 different ways of passing physreg defs to users. Collect all of the uses at the same time, and pass all of them to MI->setPhysRegsDeadExcept() to mark the remaining defs dead. The setPhysRegsDeadExcept() function will soon add the required implicit-defs to instructions with register mask operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149708 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1799,7 +1799,7 @@ void MachineInstr::setPhysRegsDeadExcept(const SmallVectorImpl<unsigned> &UsedRe
|
||||
MachineOperand &MO = getOperand(i);
|
||||
if (!MO.isReg() || !MO.isDef()) continue;
|
||||
unsigned Reg = MO.getReg();
|
||||
if (Reg == 0) continue;
|
||||
if (!TargetRegisterInfo::isPhysicalRegister(Reg)) continue;
|
||||
bool Dead = true;
|
||||
for (SmallVectorImpl<unsigned>::const_iterator I = UsedRegs.begin(),
|
||||
E = UsedRegs.end(); I != E; ++I)
|
||||
|
Reference in New Issue
Block a user