diff options
author | Dan Gohman <gohman@apple.com> | 2008-12-05 05:30:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-12-05 05:30:02 +0000 |
commit | c1dee225d036b3c7b745da41cd4dfaa02c9afc0a (patch) | |
tree | 4ef62230586d1ad7a01e81c13e57c814bd484fd5 /llvm/lib/CodeGen | |
parent | 98463cd44d334e67e03e863f7495837c0ba69e23 (diff) | |
download | bcm5719-llvm-c1dee225d036b3c7b745da41cd4dfaa02c9afc0a.tar.gz bcm5719-llvm-c1dee225d036b3c7b745da41cd4dfaa02c9afc0a.zip |
Ignore IMPLICIT_DEF instructions when computing physreg liveness.
While they appear to provide a normal clobbering def, they don't
in the case of the awkward IMPLICIT_DEF+INSERT_SUBREG idiom. It
would be good to change INSERT_SUBREG; until then, this change
allows post-regalloc scheduling to cope in a mildly conservative
way.
llvm-svn: 60583
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/PostRASchedulerList.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp index ec56feaff96..b19525cbaa8 100644 --- a/llvm/lib/CodeGen/PostRASchedulerList.cpp +++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp @@ -353,6 +353,13 @@ bool SchedulePostRATDList::BreakAntiDependencies() { I != E; ++I, --Count) { MachineInstr *MI = &*I; + // After regalloc, IMPLICIT_DEF instructions aren't safe to treat as + // dependence-breaking. In the case of an INSERT_SUBREG, the IMPLICIT_DEF + // is left behind appearing to clobber the super-register, while the + // subregister needs to remain live. So we just ignore them. + if (MI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF) + continue; + // Check if this instruction has an anti-dependence that we're // interested in. DenseMap<MachineInstr *, unsigned>::iterator C = CriticalAntiDeps.find(MI); |