diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-05 23:10:12 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-05 23:10:12 +0000 |
commit | 9b90d7eae2e72ee3f816194b6b6f9af94fb0fd0b (patch) | |
tree | 05aaa20033b38c434683f8bc57f7142fc1f4fd1c /lib/CodeGen/SplitKit.cpp | |
parent | fc3ef3c2e9e1a01f19aaf1e362d8d2f209c09a46 (diff) |
Count uses in all nested loops, not just the deepest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115710 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r-- | lib/CodeGen/SplitKit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index c47e9c9182..4aea192eb5 100644 --- a/lib/CodeGen/SplitKit.cpp +++ b/lib/CodeGen/SplitKit.cpp @@ -68,7 +68,8 @@ void SplitAnalysis::analyzeUses() { MachineBasicBlock *MBB = MI->getParent(); if (usingBlocks_[MBB]++) continue; - if (MachineLoop *Loop = loops_.getLoopFor(MBB)) + for (MachineLoop *Loop = loops_.getLoopFor(MBB); Loop; + Loop = Loop->getParentLoop()) usingLoops_[Loop]++; } DEBUG(dbgs() << " counted " |