aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-12-05 05:30:02 +0000
committerDan Gohman <gohman@apple.com>2008-12-05 05:30:02 +0000
commit2cb9f06edab79ff920f078481c04c917cd5ceac9 (patch)
treecaee0770eb8daac1f7511a849268210dd8b82a8b
parenta65854f8c54ecbf787262221338a7cffd8e3e771 (diff)
downloadexternal_llvm-2cb9f06edab79ff920f078481c04c917cd5ceac9.zip
external_llvm-2cb9f06edab79ff920f078481c04c917cd5ceac9.tar.gz
external_llvm-2cb9f06edab79ff920f078481c04c917cd5ceac9.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60583 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/PostRASchedulerList.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp
index ec56fea..b19525c 100644
--- a/lib/CodeGen/PostRASchedulerList.cpp
+++ b/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);