From: Jakob Stoklund Olesen Date: Tue, 5 Oct 2010 23:10:12 +0000 (+0000) Subject: Count uses in all nested loops, not just the deepest. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=9b90d7eae2e72ee3f816194b6b6f9af94fb0fd0b;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index c47e9c91824..4aea192eb5f 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 "