diff options
| author | Owen Anderson <resistor@mac.com> | 2008-09-26 18:50:46 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-09-26 18:50:46 +0000 |
| commit | 0aa88f440dab0e3b433332c1e716ebfa26557f38 (patch) | |
| tree | 5604fee4b916b0a0be4eb3d13ce5d434110972bf /lib | |
| parent | 3d5fca2e53aa19dafbfc6f393ad2299ffef77476 (diff) | |
| download | external_llvm-0aa88f440dab0e3b433332c1e716ebfa26557f38.zip external_llvm-0aa88f440dab0e3b433332c1e716ebfa26557f38.tar.gz external_llvm-0aa88f440dab0e3b433332c1e716ebfa26557f38.tar.bz2 | |
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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/CodeGen/StrongPHIElimination.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 33bfa57..f6aa44e 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -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 |
