summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-29 04:48:13 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-29 04:48:13 +0000
commit907673c48d8a3fee6f8ba980480e2357d4066dac (patch)
tree83695bae7eb96aff708a903597e2f96a47cf66a6 /llvm/lib/CodeGen
parentd0c8a0f0311270f55c2218b73967e891d1092b65 (diff)
downloadbcm5719-llvm-907673c48d8a3fee6f8ba980480e2357d4066dac.tar.gz
bcm5719-llvm-907673c48d8a3fee6f8ba980480e2357d4066dac.zip
When processing loops for scheduling latencies (used for live outs on loop
back-edges), make sure not to include dbg_value instructions in the count. Closing in on the end of rdar://7797940 llvm-svn: 107119
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAGInstrs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.h b/llvm/lib/CodeGen/ScheduleDAGInstrs.h
index ad82db28f88..d90659bb163 100644
--- a/llvm/lib/CodeGen/ScheduleDAGInstrs.h
+++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.h
@@ -69,8 +69,10 @@ namespace llvm {
const SmallSet<unsigned, 8> &LoopLiveIns) {
unsigned Count = 0;
for (MachineBasicBlock::const_iterator I = MBB->begin(), E = MBB->end();
- I != E; ++I, ++Count) {
+ I != E; ++I) {
const MachineInstr *MI = I;
+ if (MI->isDebugValue())
+ continue;
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
if (!MO.isReg() || !MO.isUse())
@@ -79,6 +81,7 @@ namespace llvm {
if (LoopLiveIns.count(MOReg))
Deps.insert(std::make_pair(MOReg, std::make_pair(&MO, Count)));
}
+ ++Count; // Not every iteration due to dbg_value above.
}
const std::vector<MachineDomTreeNode*> &Children = Node->getChildren();
OpenPOWER on IntegriCloud