summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ScheduleDAGInstrs.h
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
commit2f2b25451b8fd6ab0625e78df9e5c710eba2d87f (patch)
treeaddb8e16036b544403bda3fbeea23515e743e40c /lib/CodeGen/ScheduleDAGInstrs.h
parent7a64257f94202b1416bbd4981ada9076af273ee3 (diff)
downloadllvm-2f2b25451b8fd6ab0625e78df9e5c710eba2d87f.tar.gz
llvm-2f2b25451b8fd6ab0625e78df9e5c710eba2d87f.tar.bz2
llvm-2f2b25451b8fd6ab0625e78df9e5c710eba2d87f.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.h')
-rw-r--r--lib/CodeGen/ScheduleDAGInstrs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.h b/lib/CodeGen/ScheduleDAGInstrs.h
index ad82db28f8..d90659bb16 100644
--- a/lib/CodeGen/ScheduleDAGInstrs.h
+++ b/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();