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 | 4d5156c7d0d85f03562545795f75d610582aa449 (patch) | |
| tree | f347df0bb9258412d87cc70347f5833c8cf78ad5 | |
| parent | 56e2925e6c5ca0476d87b950387adf6de8c9c971 (diff) | |
| download | bcm5719-llvm-4d5156c7d0d85f03562545795f75d610582aa449.tar.gz bcm5719-llvm-4d5156c7d0d85f03562545795f75d610582aa449.zip | |
Count uses in all nested loops, not just the deepest.
llvm-svn: 115710
| -rw-r--r-- | llvm/lib/CodeGen/SplitKit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index c47e9c91824..4aea192eb5f 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/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 " |

