Owen Anderson | 2480737 | 2006-05-26 21:11:53 +0000 | [diff] [blame] | 1 | //===-- LCSSA.cpp - Convert loops into loop-closed SSA form ---------------===// |
Owen Anderson | 11f510b | 2006-05-26 13:58:26 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Owen Anderson | 11f510b | 2006-05-26 13:58:26 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This pass transforms loops by placing phi nodes at the end of the loops for |
| 11 | // all values that are live across the loop boundary. For example, it turns |
| 12 | // the left into the right code: |
| 13 | // |
| 14 | // for (...) for (...) |
Dan Gohman | 23d9d27 | 2007-05-11 21:10:54 +0000 | [diff] [blame] | 15 | // if (c) if (c) |
Owen Anderson | 11f510b | 2006-05-26 13:58:26 +0000 | [diff] [blame] | 16 | // X1 = ... X1 = ... |
| 17 | // else else |
| 18 | // X2 = ... X2 = ... |
| 19 | // X3 = phi(X1, X2) X3 = phi(X1, X2) |
Dan Gohman | c702a9e | 2008-06-03 00:57:21 +0000 | [diff] [blame] | 20 | // ... = X3 + 4 X4 = phi(X3) |
| 21 | // ... = X4 + 4 |
Owen Anderson | 11f510b | 2006-05-26 13:58:26 +0000 | [diff] [blame] | 22 | // |
| 23 | // This is still valid LLVM; the extra phi nodes are purely redundant, and will |
| 24 | // be trivially eliminated by InstCombine. The major benefit of this |
| 25 | // transformation is that it makes many other loop optimizations, such as |
| 26 | // LoopUnswitching, simpler. |
| 27 | // |
| 28 | //===----------------------------------------------------------------------===// |
| 29 | |
Owen Anderson | 2480737 | 2006-05-26 21:11:53 +0000 | [diff] [blame] | 30 | #include "llvm/Transforms/Scalar.h" |
Chandler Carruth | d04a8d4 | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 31 | #include "llvm/ADT/STLExtras.h" |
| 32 | #include "llvm/ADT/Statistic.h" |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 33 | #include "llvm/Analysis/AliasAnalysis.h" |
Devang Patel | b4559a2 | 2007-07-13 23:57:11 +0000 | [diff] [blame] | 34 | #include "llvm/Analysis/LoopPass.h" |
| 35 | #include "llvm/Analysis/ScalarEvolution.h" |
Chandler Carruth | 0b8c9a8 | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 36 | #include "llvm/IR/Constants.h" |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 37 | #include "llvm/IR/Dominators.h" |
Chandler Carruth | 0b8c9a8 | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 38 | #include "llvm/IR/Function.h" |
| 39 | #include "llvm/IR/Instructions.h" |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 40 | #include "llvm/IR/PredIteratorCache.h" |
Chandler Carruth | d04a8d4 | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 41 | #include "llvm/Pass.h" |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 42 | #include "llvm/Transforms/Utils/LoopUtils.h" |
Chandler Carruth | d04a8d4 | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 43 | #include "llvm/Transforms/Utils/SSAUpdater.h" |
Owen Anderson | 11f510b | 2006-05-26 13:58:26 +0000 | [diff] [blame] | 44 | using namespace llvm; |
| 45 | |
Stephen Hines | dce4a40 | 2014-05-29 02:49:00 -0700 | [diff] [blame^] | 46 | #define DEBUG_TYPE "lcssa" |
| 47 | |
Chris Lattner | d216e8b | 2006-12-19 22:17:40 +0000 | [diff] [blame] | 48 | STATISTIC(NumLCSSA, "Number of live out of a loop variables"); |
| 49 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 50 | /// Return true if the specified block is in the list. |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 51 | static bool isExitBlock(BasicBlock *BB, |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 52 | const SmallVectorImpl<BasicBlock *> &ExitBlocks) { |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 53 | for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) |
| 54 | if (ExitBlocks[i] == BB) |
| 55 | return true; |
| 56 | return false; |
| 57 | } |
| 58 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 59 | /// Given an instruction in the loop, check to see if it has any uses that are |
| 60 | /// outside the current loop. If so, insert LCSSA PHI nodes and rewrite the |
| 61 | /// uses. |
| 62 | static bool processInstruction(Loop &L, Instruction &Inst, DominatorTree &DT, |
| 63 | const SmallVectorImpl<BasicBlock *> &ExitBlocks, |
| 64 | PredIteratorCache &PredCache) { |
| 65 | SmallVector<Use *, 16> UsesToRewrite; |
| 66 | |
| 67 | BasicBlock *InstBB = Inst.getParent(); |
| 68 | |
| 69 | for (Use &U : Inst.uses()) { |
| 70 | Instruction *User = cast<Instruction>(U.getUser()); |
| 71 | BasicBlock *UserBB = User->getParent(); |
| 72 | if (PHINode *PN = dyn_cast<PHINode>(User)) |
| 73 | UserBB = PN->getIncomingBlock(U); |
| 74 | |
| 75 | if (InstBB != UserBB && !L.contains(UserBB)) |
| 76 | UsesToRewrite.push_back(&U); |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 77 | } |
Gabor Greif | a29742d | 2010-07-09 14:29:14 +0000 | [diff] [blame] | 78 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 79 | // If there are no uses outside the loop, exit with no change. |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 80 | if (UsesToRewrite.empty()) |
| 81 | return false; |
| 82 | |
Owen Anderson | 408a406 | 2006-05-31 20:55:06 +0000 | [diff] [blame] | 83 | ++NumLCSSA; // We are applying the transformation |
Chris Lattner | d41ae8b | 2006-08-02 00:06:09 +0000 | [diff] [blame] | 84 | |
Dan Gohman | 6b9c959 | 2009-06-26 00:31:13 +0000 | [diff] [blame] | 85 | // Invoke instructions are special in that their result value is not available |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 86 | // along their unwind edge. The code below tests to see whether DomBB |
| 87 | // dominates |
Dan Gohman | 6b9c959 | 2009-06-26 00:31:13 +0000 | [diff] [blame] | 88 | // the value, so adjust DomBB to the normal destination block, which is |
| 89 | // effectively where the value is first usable. |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 90 | BasicBlock *DomBB = Inst.getParent(); |
| 91 | if (InvokeInst *Inv = dyn_cast<InvokeInst>(&Inst)) |
Dan Gohman | 6b9c959 | 2009-06-26 00:31:13 +0000 | [diff] [blame] | 92 | DomBB = Inv->getNormalDest(); |
| 93 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 94 | DomTreeNode *DomNode = DT.getNode(DomBB); |
Chris Lattner | d41ae8b | 2006-08-02 00:06:09 +0000 | [diff] [blame] | 95 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 96 | SmallVector<PHINode *, 16> AddedPHIs; |
Cameron Zwarich | 838b97e | 2011-03-15 07:41:25 +0000 | [diff] [blame] | 97 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 98 | SSAUpdater SSAUpdate; |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 99 | SSAUpdate.Initialize(Inst.getType(), Inst.getName()); |
| 100 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 101 | // Insert the LCSSA phi's into all of the exit blocks dominated by the |
Dan Gohman | f6572d0 | 2009-11-09 18:28:24 +0000 | [diff] [blame] | 102 | // value, and add them to the Phi's map. |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 103 | for (SmallVectorImpl<BasicBlock *>::const_iterator BBI = ExitBlocks.begin(), |
| 104 | BBE = ExitBlocks.end(); |
| 105 | BBI != BBE; ++BBI) { |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 106 | BasicBlock *ExitBB = *BBI; |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 107 | if (!DT.dominates(DomNode, DT.getNode(ExitBB))) |
| 108 | continue; |
| 109 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 110 | // If we already inserted something for this BB, don't reprocess it. |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 111 | if (SSAUpdate.HasValueForBlock(ExitBB)) |
| 112 | continue; |
| 113 | |
| 114 | PHINode *PN = PHINode::Create(Inst.getType(), PredCache.GetNumPreds(ExitBB), |
| 115 | Inst.getName() + ".lcssa", ExitBB->begin()); |
Chris Lattner | cbea67f | 2006-10-31 18:56:48 +0000 | [diff] [blame] | 116 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 117 | // Add inputs from inside the loop for this PHI. |
Dan Gohman | f6572d0 | 2009-11-09 18:28:24 +0000 | [diff] [blame] | 118 | for (BasicBlock **PI = PredCache.GetPreds(ExitBB); *PI; ++PI) { |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 119 | PN->addIncoming(&Inst, *PI); |
Dan Gohman | f6572d0 | 2009-11-09 18:28:24 +0000 | [diff] [blame] | 120 | |
| 121 | // If the exit block has a predecessor not within the loop, arrange for |
Dan Gohman | eaa181c | 2009-11-09 18:59:22 +0000 | [diff] [blame] | 122 | // the incoming value use corresponding to that predecessor to be |
Dan Gohman | f6572d0 | 2009-11-09 18:28:24 +0000 | [diff] [blame] | 123 | // rewritten in terms of a different LCSSA PHI. |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 124 | if (!L.contains(*PI)) |
Dan Gohman | f6572d0 | 2009-11-09 18:28:24 +0000 | [diff] [blame] | 125 | UsesToRewrite.push_back( |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 126 | &PN->getOperandUse(PN->getOperandNumForIncomingValue( |
| 127 | PN->getNumIncomingValues() - 1))); |
Dan Gohman | f6572d0 | 2009-11-09 18:28:24 +0000 | [diff] [blame] | 128 | } |
Cameron Zwarich | 838b97e | 2011-03-15 07:41:25 +0000 | [diff] [blame] | 129 | |
| 130 | AddedPHIs.push_back(PN); |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 131 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 132 | // Remember that this phi makes the value alive in this block. |
| 133 | SSAUpdate.AddAvailableValue(ExitBB, PN); |
Owen Anderson | 3d2aa47 | 2006-06-12 07:10:16 +0000 | [diff] [blame] | 134 | } |
Benjamin Kramer | 4ad3d98 | 2012-10-31 10:01:29 +0000 | [diff] [blame] | 135 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 136 | // Rewrite all uses outside the loop in terms of the new PHIs we just |
| 137 | // inserted. |
| 138 | for (unsigned i = 0, e = UsesToRewrite.size(); i != e; ++i) { |
| 139 | // If this use is in an exit block, rewrite to use the newly inserted PHI. |
| 140 | // This is required for correctness because SSAUpdate doesn't handle uses in |
| 141 | // the same block. It assumes the PHI we inserted is at the end of the |
| 142 | // block. |
| 143 | Instruction *User = cast<Instruction>(UsesToRewrite[i]->getUser()); |
| 144 | BasicBlock *UserBB = User->getParent(); |
| 145 | if (PHINode *PN = dyn_cast<PHINode>(User)) |
| 146 | UserBB = PN->getIncomingBlock(*UsesToRewrite[i]); |
| 147 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 148 | if (isa<PHINode>(UserBB->begin()) && isExitBlock(UserBB, ExitBlocks)) { |
Benjamin Kramer | ccd492c | 2012-10-31 16:30:03 +0000 | [diff] [blame] | 149 | // Tell the VHs that the uses changed. This updates SCEV's caches. |
| 150 | if (UsesToRewrite[i]->get()->hasValueHandle()) |
| 151 | ValueHandleBase::ValueIsRAUWd(*UsesToRewrite[i], UserBB->begin()); |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 152 | UsesToRewrite[i]->set(UserBB->begin()); |
Chris Lattner | d41ae8b | 2006-08-02 00:06:09 +0000 | [diff] [blame] | 153 | continue; |
Owen Anderson | 2824da4 | 2006-06-01 06:05:47 +0000 | [diff] [blame] | 154 | } |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 155 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 156 | // Otherwise, do full PHI insertion. |
| 157 | SSAUpdate.RewriteUse(*UsesToRewrite[i]); |
Chris Lattner | d41ae8b | 2006-08-02 00:06:09 +0000 | [diff] [blame] | 158 | } |
Cameron Zwarich | 838b97e | 2011-03-15 07:41:25 +0000 | [diff] [blame] | 159 | |
| 160 | // Remove PHI nodes that did not have any uses rewritten. |
| 161 | for (unsigned i = 0, e = AddedPHIs.size(); i != e; ++i) { |
Cameron Zwarich | 6e51c6a | 2011-03-15 18:42:33 +0000 | [diff] [blame] | 162 | if (AddedPHIs[i]->use_empty()) |
Cameron Zwarich | 838b97e | 2011-03-15 07:41:25 +0000 | [diff] [blame] | 163 | AddedPHIs[i]->eraseFromParent(); |
| 164 | } |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 165 | |
Chris Lattner | 8c1db67 | 2009-10-11 02:53:37 +0000 | [diff] [blame] | 166 | return true; |
Owen Anderson | 408a406 | 2006-05-31 20:55:06 +0000 | [diff] [blame] | 167 | } |
Chris Lattner | d41ae8b | 2006-08-02 00:06:09 +0000 | [diff] [blame] | 168 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 169 | /// Return true if the specified block dominates at least |
| 170 | /// one of the blocks in the specified list. |
| 171 | static bool |
| 172 | blockDominatesAnExit(BasicBlock *BB, |
| 173 | DominatorTree &DT, |
| 174 | const SmallVectorImpl<BasicBlock *> &ExitBlocks) { |
| 175 | DomTreeNode *DomNode = DT.getNode(BB); |
| 176 | for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) |
| 177 | if (DT.dominates(DomNode, DT.getNode(ExitBlocks[i]))) |
| 178 | return true; |
| 179 | |
| 180 | return false; |
| 181 | } |
| 182 | |
| 183 | bool llvm::formLCSSA(Loop &L, DominatorTree &DT, ScalarEvolution *SE) { |
| 184 | bool Changed = false; |
| 185 | |
| 186 | // Get the set of exiting blocks. |
| 187 | SmallVector<BasicBlock *, 8> ExitBlocks; |
| 188 | L.getExitBlocks(ExitBlocks); |
| 189 | |
| 190 | if (ExitBlocks.empty()) |
| 191 | return false; |
| 192 | |
| 193 | PredIteratorCache PredCache; |
| 194 | |
| 195 | // Look at all the instructions in the loop, checking to see if they have uses |
| 196 | // outside the loop. If so, rewrite those uses. |
| 197 | for (Loop::block_iterator BBI = L.block_begin(), BBE = L.block_end(); |
| 198 | BBI != BBE; ++BBI) { |
| 199 | BasicBlock *BB = *BBI; |
| 200 | |
| 201 | // For large loops, avoid use-scanning by using dominance information: In |
| 202 | // particular, if a block does not dominate any of the loop exits, then none |
| 203 | // of the values defined in the block could be used outside the loop. |
| 204 | if (!blockDominatesAnExit(BB, DT, ExitBlocks)) |
| 205 | continue; |
| 206 | |
| 207 | for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) { |
| 208 | // Reject two common cases fast: instructions with no uses (like stores) |
| 209 | // and instructions with one use that is in the same block as this. |
| 210 | if (I->use_empty() || |
| 211 | (I->hasOneUse() && I->user_back()->getParent() == BB && |
| 212 | !isa<PHINode>(I->user_back()))) |
| 213 | continue; |
| 214 | |
| 215 | Changed |= processInstruction(L, *I, DT, ExitBlocks, PredCache); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | // If we modified the code, remove any caches about the loop from SCEV to |
| 220 | // avoid dangling entries. |
| 221 | // FIXME: This is a big hammer, can we clear the cache more selectively? |
| 222 | if (SE && Changed) |
| 223 | SE->forgetLoop(&L); |
| 224 | |
| 225 | assert(L.isLCSSAForm(DT)); |
| 226 | |
| 227 | return Changed; |
| 228 | } |
| 229 | |
| 230 | /// Process a loop nest depth first. |
| 231 | bool llvm::formLCSSARecursively(Loop &L, DominatorTree &DT, |
| 232 | ScalarEvolution *SE) { |
| 233 | bool Changed = false; |
| 234 | |
| 235 | // Recurse depth-first through inner loops. |
| 236 | for (Loop::iterator LI = L.begin(), LE = L.end(); LI != LE; ++LI) |
| 237 | Changed |= formLCSSARecursively(**LI, DT, SE); |
| 238 | |
| 239 | Changed |= formLCSSA(L, DT, SE); |
| 240 | return Changed; |
| 241 | } |
| 242 | |
| 243 | namespace { |
| 244 | struct LCSSA : public FunctionPass { |
| 245 | static char ID; // Pass identification, replacement for typeid |
| 246 | LCSSA() : FunctionPass(ID) { |
| 247 | initializeLCSSAPass(*PassRegistry::getPassRegistry()); |
| 248 | } |
| 249 | |
| 250 | // Cached analysis information for the current function. |
| 251 | DominatorTree *DT; |
| 252 | LoopInfo *LI; |
| 253 | ScalarEvolution *SE; |
| 254 | |
| 255 | bool runOnFunction(Function &F) override; |
| 256 | |
| 257 | /// This transformation requires natural loop information & requires that |
| 258 | /// loop preheaders be inserted into the CFG. It maintains both of these, |
| 259 | /// as well as the CFG. It also requires dominator information. |
| 260 | void getAnalysisUsage(AnalysisUsage &AU) const override { |
| 261 | AU.setPreservesCFG(); |
| 262 | |
| 263 | AU.addRequired<DominatorTreeWrapperPass>(); |
| 264 | AU.addRequired<LoopInfo>(); |
| 265 | AU.addPreservedID(LoopSimplifyID); |
| 266 | AU.addPreserved<AliasAnalysis>(); |
| 267 | AU.addPreserved<ScalarEvolution>(); |
| 268 | } |
| 269 | |
| 270 | private: |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 271 | void verifyAnalysis() const override; |
| 272 | }; |
| 273 | } |
| 274 | |
| 275 | char LCSSA::ID = 0; |
| 276 | INITIALIZE_PASS_BEGIN(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false) |
| 277 | INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) |
| 278 | INITIALIZE_PASS_DEPENDENCY(LoopInfo) |
| 279 | INITIALIZE_PASS_END(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false) |
| 280 | |
| 281 | Pass *llvm::createLCSSAPass() { return new LCSSA(); } |
| 282 | char &llvm::LCSSAID = LCSSA::ID; |
| 283 | |
| 284 | |
| 285 | /// Process all loops in the function, inner-most out. |
| 286 | bool LCSSA::runOnFunction(Function &F) { |
| 287 | bool Changed = false; |
| 288 | LI = &getAnalysis<LoopInfo>(); |
| 289 | DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); |
| 290 | SE = getAnalysisIfAvailable<ScalarEvolution>(); |
| 291 | |
| 292 | // Simplify each loop nest in the function. |
| 293 | for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) |
| 294 | Changed |= formLCSSARecursively(**I, *DT, SE); |
| 295 | |
| 296 | return Changed; |
| 297 | } |
| 298 | |
| 299 | static void verifyLoop(Loop &L, DominatorTree &DT) { |
| 300 | // Recurse depth-first through inner loops. |
| 301 | for (Loop::iterator LI = L.begin(), LE = L.end(); LI != LE; ++LI) |
| 302 | verifyLoop(**LI, DT); |
| 303 | |
| 304 | // Check the special guarantees that LCSSA makes. |
| 305 | //assert(L.isLCSSAForm(DT) && "LCSSA form not preserved!"); |
| 306 | } |
| 307 | |
| 308 | void LCSSA::verifyAnalysis() const { |
| 309 | // Verify each loop nest in the function, assuming LI still points at that |
| 310 | // function's loop info. |
| 311 | for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) |
| 312 | verifyLoop(**I, *DT); |
| 313 | } |