diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-06-29 04:48:13 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-06-29 04:48:13 +0000 |
commit | 2f2b25451b8fd6ab0625e78df9e5c710eba2d87f (patch) | |
tree | addb8e16036b544403bda3fbeea23515e743e40c /lib/CodeGen | |
parent | 7a64257f94202b1416bbd4981ada9076af273ee3 (diff) | |
download | external_llvm-2f2b25451b8fd6ab0625e78df9e5c710eba2d87f.zip external_llvm-2f2b25451b8fd6ab0625e78df9e5c710eba2d87f.tar.gz external_llvm-2f2b25451b8fd6ab0625e78df9e5c710eba2d87f.tar.bz2 |
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')
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.h b/lib/CodeGen/ScheduleDAGInstrs.h index ad82db2..d90659b 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(); |