summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ExecutionDepsFix.cpp
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2012-10-03 08:29:36 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2012-10-03 08:29:36 +0000
commit3c314990e64c891c406d6b5924a8434517d653de (patch)
treed74f1e33191a5ac929211223120be797175b3101 /llvm/lib/CodeGen/ExecutionDepsFix.cpp
parent08e5f49f90a82ab2aacb2fe096a239625eb17e84 (diff)
downloadbcm5719-llvm-3c314990e64c891c406d6b5924a8434517d653de.tar.gz
bcm5719-llvm-3c314990e64c891c406d6b5924a8434517d653de.zip
Fixed a bug in the ExecutionDependencyFix pass that caused dependencies to not propagate through implicit defs.
llvm-svn: 165102
Diffstat (limited to 'llvm/lib/CodeGen/ExecutionDepsFix.cpp')
-rw-r--r--llvm/lib/CodeGen/ExecutionDepsFix.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp
index fee8e47b832..2311842671a 100644
--- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp
+++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp
@@ -626,9 +626,12 @@ void ExeDepsFix::visitSoftInstr(MachineInstr *mi, unsigned mask) {
}
dv->Instrs.push_back(mi);
- // Finally set all defs and non-collapsed uses to dv.
- for (unsigned i = 0, e = mi->getDesc().getNumOperands(); i != e; ++i) {
- MachineOperand &mo = mi->getOperand(i);
+ // Finally set all defs and non-collapsed uses to dv. We must iterate through
+ // all the operators, including imp-def ones.
+ for (MachineInstr::mop_iterator ii = mi->operands_begin(),
+ ee = mi->operands_end();
+ ii != ee; ++ii) {
+ MachineOperand &mo = *ii;
if (!mo.isReg()) continue;
int rx = regIndex(mo.getReg());
if (rx < 0) continue;
OpenPOWER on IntegriCloud