summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-02-22 06:08:13 +0000
committerAndrew Trick <atrick@apple.com>2012-02-22 06:08:13 +0000
commitdb42c6faa48462ffbbae3b001bf364954042c65b (patch)
treed2ceb841a237e829eb3436352fed4be29f85b90c /llvm/lib/CodeGen
parent46cc9a4aaa1c3c110ba7d925cbba402b769441a5 (diff)
downloadbcm5719-llvm-db42c6faa48462ffbbae3b001bf364954042c65b.tar.gz
bcm5719-llvm-db42c6faa48462ffbbae3b001bf364954042c65b.zip
misched: DAG builder should not track dependencies for SSA defs.
The vast majority of virtual register definitions don't need an entry in the DAG builder's VRegDefs set. llvm-svn: 151136
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAGInstrs.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
index a0992c1c464..ddf445d7a94 100644
--- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -44,7 +44,7 @@ ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf,
LoopRegs(MLI, MDT), FirstDbgValue(0) {
assert((IsPostRA || LIS) && "PreRA scheduling requires LiveIntervals");
DbgValues.clear();
- assert(!(IsPostRA && MF.getRegInfo().getNumVirtRegs()) &&
+ assert(!(IsPostRA && MRI.getNumVirtRegs()) &&
"Virtual registers must be removed prior to PostRA scheduling");
}
@@ -361,6 +361,10 @@ void ScheduleDAGInstrs::addVRegDefDeps(SUnit *SU, unsigned OperIdx) {
const MachineInstr *MI = SU->getInstr();
unsigned Reg = MI->getOperand(OperIdx).getReg();
+ // SSA defs do not have output/anti dependencies.
+ if (llvm::next(MRI.def_begin(Reg)) == MRI.def_end())
+ return;
+
// Add output dependence to the next nearest def of this vreg.
//
// Unless this definition is dead, the output dependence should be
OpenPOWER on IntegriCloud