mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
We don't need to insert copies for implicit_def's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0eecd899ea
commit
082d351361
@ -419,7 +419,6 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
|
||||
MachineBasicBlock::iterator P = MBB->begin();
|
||||
while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) {
|
||||
unsigned DestReg = P->getOperand(0).getReg();
|
||||
|
||||
|
||||
// Don't both doing PHI elimination for dead PHI's.
|
||||
if (P->registerDefIsDead(DestReg)) {
|
||||
@ -448,6 +447,11 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
|
||||
ProcessedNames.insert(SrcReg);
|
||||
continue;
|
||||
}
|
||||
|
||||
// We don't need to insert copies for implicit_defs.
|
||||
MachineInstr* DefMI = MRI.getVRegDef(SrcReg);
|
||||
if (DefMI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF)
|
||||
ProcessedNames.insert(SrcReg);
|
||||
|
||||
// Check for trivial interferences via liveness information, allowing us
|
||||
// to avoid extra work later. Any registers that interfere cannot both
|
||||
|
Loading…
x
Reference in New Issue
Block a user