Chris Lattner | cf3056d | 2003-10-13 03:32:08 +0000 | [diff] [blame] | 1 | //===- LoopInfo.cpp - Natural Loop Calculator -----------------------------===// |
Misha Brukman | 2b37d7c | 2005-04-21 21:13:18 +0000 | [diff] [blame] | 2 | // |
John Criswell | b576c94 | 2003-10-20 19:43:21 +0000 | [diff] [blame] | 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. |
Misha Brukman | 2b37d7c | 2005-04-21 21:13:18 +0000 | [diff] [blame] | 7 | // |
John Criswell | b576c94 | 2003-10-20 19:43:21 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Chris Lattner | 0bbe58f | 2001-11-26 18:41:20 +0000 | [diff] [blame] | 9 | // |
| 10 | // This file defines the LoopInfo class that is used to identify natural loops |
| 11 | // and determine the loop depth of various nodes of the CFG. Note that the |
| 12 | // loops identified may actually be several natural loops that share the same |
| 13 | // header node... not just a single natural loop. |
| 14 | // |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
Misha Brukman | 10d208d | 2004-01-30 17:26:24 +0000 | [diff] [blame] | 17 | #include "llvm/Analysis/LoopInfo.h" |
Chris Lattner | 92020fa | 2004-04-15 15:16:02 +0000 | [diff] [blame] | 18 | #include "llvm/Constants.h" |
| 19 | #include "llvm/Instructions.h" |
| 20 | #include "llvm/Analysis/Dominators.h" |
Chris Lattner | a59cbb2 | 2002-07-27 01:12:17 +0000 | [diff] [blame] | 21 | #include "llvm/Assembly/Writer.h" |
Misha Brukman | 10d208d | 2004-01-30 17:26:24 +0000 | [diff] [blame] | 22 | #include "llvm/Support/CFG.h" |
Reid Spencer | 551ccae | 2004-09-01 22:55:40 +0000 | [diff] [blame] | 23 | #include "llvm/ADT/DepthFirstIterator.h" |
Chris Lattner | b1f5d8b | 2007-03-04 04:06:39 +0000 | [diff] [blame] | 24 | #include "llvm/ADT/SmallPtrSet.h" |
Chris Lattner | 0bbe58f | 2001-11-26 18:41:20 +0000 | [diff] [blame] | 25 | #include <algorithm> |
Chris Lattner | 46758a8 | 2004-04-12 20:26:17 +0000 | [diff] [blame] | 26 | using namespace llvm; |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 27 | |
Devang Patel | 1997473 | 2007-05-03 01:11:54 +0000 | [diff] [blame] | 28 | char LoopInfo::ID = 0; |
Chris Lattner | 5d8925c | 2006-08-27 22:30:17 +0000 | [diff] [blame] | 29 | static RegisterPass<LoopInfo> |
Dan Gohman | 7e54404 | 2009-05-01 21:58:05 +0000 | [diff] [blame] | 30 | X("loops", "Natural Loop Information", true, true); |
Chris Lattner | 93193f8 | 2002-01-31 00:42:27 +0000 | [diff] [blame] | 31 | |
| 32 | //===----------------------------------------------------------------------===// |
Chris Lattner | 1b7f7dc | 2002-04-28 16:21:30 +0000 | [diff] [blame] | 33 | // Loop implementation |
Chris Lattner | 93193f8 | 2002-01-31 00:42:27 +0000 | [diff] [blame] | 34 | // |
Misha Brukman | 6b290a5 | 2002-10-11 05:31:10 +0000 | [diff] [blame] | 35 | |
Dan Gohman | 16a2c92 | 2009-07-13 22:02:44 +0000 | [diff] [blame] | 36 | /// isLoopInvariant - Return true if the specified value is loop invariant |
| 37 | /// |
| 38 | bool Loop::isLoopInvariant(Value *V) const { |
| 39 | if (Instruction *I = dyn_cast<Instruction>(V)) |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 40 | return isLoopInvariant(I); |
Dan Gohman | 16a2c92 | 2009-07-13 22:02:44 +0000 | [diff] [blame] | 41 | return true; // All non-instructions are loop invariant |
| 42 | } |
| 43 | |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 44 | /// isLoopInvariant - Return true if the specified instruction is |
| 45 | /// loop-invariant. |
| 46 | /// |
| 47 | bool Loop::isLoopInvariant(Instruction *I) const { |
| 48 | return !contains(I->getParent()); |
| 49 | } |
| 50 | |
| 51 | /// makeLoopInvariant - If the given value is an instruciton inside of the |
| 52 | /// loop and it can be hoisted, do so to make it trivially loop-invariant. |
| 53 | /// Return true if the value after any hoisting is loop invariant. This |
| 54 | /// function can be used as a slightly more aggressive replacement for |
| 55 | /// isLoopInvariant. |
| 56 | /// |
| 57 | /// If InsertPt is specified, it is the point to hoist instructions to. |
| 58 | /// If null, the terminator of the loop preheader is used. |
| 59 | /// |
Dan Gohman | bdc017e | 2009-07-15 01:25:43 +0000 | [diff] [blame] | 60 | bool Loop::makeLoopInvariant(Value *V, bool &Changed, |
| 61 | Instruction *InsertPt) const { |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 62 | if (Instruction *I = dyn_cast<Instruction>(V)) |
Dan Gohman | bdc017e | 2009-07-15 01:25:43 +0000 | [diff] [blame] | 63 | return makeLoopInvariant(I, Changed, InsertPt); |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 64 | return true; // All non-instructions are loop-invariant. |
| 65 | } |
| 66 | |
| 67 | /// makeLoopInvariant - If the given instruction is inside of the |
| 68 | /// loop and it can be hoisted, do so to make it trivially loop-invariant. |
| 69 | /// Return true if the instruction after any hoisting is loop invariant. This |
| 70 | /// function can be used as a slightly more aggressive replacement for |
| 71 | /// isLoopInvariant. |
| 72 | /// |
| 73 | /// If InsertPt is specified, it is the point to hoist instructions to. |
| 74 | /// If null, the terminator of the loop preheader is used. |
| 75 | /// |
Dan Gohman | bdc017e | 2009-07-15 01:25:43 +0000 | [diff] [blame] | 76 | bool Loop::makeLoopInvariant(Instruction *I, bool &Changed, |
| 77 | Instruction *InsertPt) const { |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 78 | // Test if the value is already loop-invariant. |
| 79 | if (isLoopInvariant(I)) |
| 80 | return true; |
Eli Friedman | 0b79a77 | 2009-07-17 04:28:42 +0000 | [diff] [blame] | 81 | if (!I->isSafeToSpeculativelyExecute()) |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 82 | return false; |
Eli Friedman | 0b79a77 | 2009-07-17 04:28:42 +0000 | [diff] [blame] | 83 | if (I->mayReadFromMemory()) |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 84 | return false; |
| 85 | // Determine the insertion point, unless one was given. |
| 86 | if (!InsertPt) { |
| 87 | BasicBlock *Preheader = getLoopPreheader(); |
| 88 | // Without a preheader, hoisting is not feasible. |
| 89 | if (!Preheader) |
| 90 | return false; |
| 91 | InsertPt = Preheader->getTerminator(); |
| 92 | } |
| 93 | // Don't hoist instructions with loop-variant operands. |
| 94 | for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) |
Dan Gohman | bdc017e | 2009-07-15 01:25:43 +0000 | [diff] [blame] | 95 | if (!makeLoopInvariant(I->getOperand(i), Changed, InsertPt)) |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 96 | return false; |
| 97 | // Hoist. |
| 98 | I->moveBefore(InsertPt); |
Dan Gohman | bdc017e | 2009-07-15 01:25:43 +0000 | [diff] [blame] | 99 | Changed = true; |
Dan Gohman | a342026 | 2009-07-14 01:06:29 +0000 | [diff] [blame] | 100 | return true; |
| 101 | } |
| 102 | |
Dan Gohman | 16a2c92 | 2009-07-13 22:02:44 +0000 | [diff] [blame] | 103 | /// getCanonicalInductionVariable - Check to see if the loop has a canonical |
| 104 | /// induction variable: an integer recurrence that starts at 0 and increments |
| 105 | /// by one each time through the loop. If so, return the phi node that |
| 106 | /// corresponds to it. |
| 107 | /// |
| 108 | /// The IndVarSimplify pass transforms loops to have a canonical induction |
| 109 | /// variable. |
| 110 | /// |
| 111 | PHINode *Loop::getCanonicalInductionVariable() const { |
| 112 | BasicBlock *H = getHeader(); |
| 113 | |
| 114 | BasicBlock *Incoming = 0, *Backedge = 0; |
| 115 | typedef GraphTraits<Inverse<BasicBlock*> > InvBlockTraits; |
| 116 | InvBlockTraits::ChildIteratorType PI = InvBlockTraits::child_begin(H); |
| 117 | assert(PI != InvBlockTraits::child_end(H) && |
| 118 | "Loop must have at least one backedge!"); |
| 119 | Backedge = *PI++; |
| 120 | if (PI == InvBlockTraits::child_end(H)) return 0; // dead loop |
| 121 | Incoming = *PI++; |
| 122 | if (PI != InvBlockTraits::child_end(H)) return 0; // multiple backedges? |
| 123 | |
| 124 | if (contains(Incoming)) { |
| 125 | if (contains(Backedge)) |
| 126 | return 0; |
| 127 | std::swap(Incoming, Backedge); |
| 128 | } else if (!contains(Backedge)) |
| 129 | return 0; |
| 130 | |
| 131 | // Loop over all of the PHI nodes, looking for a canonical indvar. |
| 132 | for (BasicBlock::iterator I = H->begin(); isa<PHINode>(I); ++I) { |
| 133 | PHINode *PN = cast<PHINode>(I); |
| 134 | if (ConstantInt *CI = |
| 135 | dyn_cast<ConstantInt>(PN->getIncomingValueForBlock(Incoming))) |
| 136 | if (CI->isNullValue()) |
| 137 | if (Instruction *Inc = |
| 138 | dyn_cast<Instruction>(PN->getIncomingValueForBlock(Backedge))) |
| 139 | if (Inc->getOpcode() == Instruction::Add && |
| 140 | Inc->getOperand(0) == PN) |
| 141 | if (ConstantInt *CI = dyn_cast<ConstantInt>(Inc->getOperand(1))) |
| 142 | if (CI->equalsInt(1)) |
| 143 | return PN; |
| 144 | } |
| 145 | return 0; |
| 146 | } |
| 147 | |
| 148 | /// getCanonicalInductionVariableIncrement - Return the LLVM value that holds |
| 149 | /// the canonical induction variable value for the "next" iteration of the |
| 150 | /// loop. This always succeeds if getCanonicalInductionVariable succeeds. |
| 151 | /// |
| 152 | Instruction *Loop::getCanonicalInductionVariableIncrement() const { |
| 153 | if (PHINode *PN = getCanonicalInductionVariable()) { |
| 154 | bool P1InLoop = contains(PN->getIncomingBlock(1)); |
| 155 | return cast<Instruction>(PN->getIncomingValue(P1InLoop)); |
| 156 | } |
| 157 | return 0; |
| 158 | } |
| 159 | |
| 160 | /// getTripCount - Return a loop-invariant LLVM value indicating the number of |
| 161 | /// times the loop will be executed. Note that this means that the backedge |
| 162 | /// of the loop executes N-1 times. If the trip-count cannot be determined, |
| 163 | /// this returns null. |
| 164 | /// |
| 165 | /// The IndVarSimplify pass transforms loops to have a form that this |
| 166 | /// function easily understands. |
| 167 | /// |
| 168 | Value *Loop::getTripCount() const { |
| 169 | // Canonical loops will end with a 'cmp ne I, V', where I is the incremented |
| 170 | // canonical induction variable and V is the trip count of the loop. |
| 171 | Instruction *Inc = getCanonicalInductionVariableIncrement(); |
| 172 | if (Inc == 0) return 0; |
| 173 | PHINode *IV = cast<PHINode>(Inc->getOperand(0)); |
| 174 | |
| 175 | BasicBlock *BackedgeBlock = |
| 176 | IV->getIncomingBlock(contains(IV->getIncomingBlock(1))); |
| 177 | |
| 178 | if (BranchInst *BI = dyn_cast<BranchInst>(BackedgeBlock->getTerminator())) |
| 179 | if (BI->isConditional()) { |
| 180 | if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { |
| 181 | if (ICI->getOperand(0) == Inc) { |
| 182 | if (BI->getSuccessor(0) == getHeader()) { |
| 183 | if (ICI->getPredicate() == ICmpInst::ICMP_NE) |
| 184 | return ICI->getOperand(1); |
| 185 | } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) { |
| 186 | return ICI->getOperand(1); |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | return 0; |
| 193 | } |
| 194 | |
| 195 | /// getSmallConstantTripCount - Returns the trip count of this loop as a |
| 196 | /// normal unsigned value, if possible. Returns 0 if the trip count is unknown |
| 197 | /// of not constant. Will also return 0 if the trip count is very large |
| 198 | /// (>= 2^32) |
| 199 | unsigned Loop::getSmallConstantTripCount() const { |
| 200 | Value* TripCount = this->getTripCount(); |
| 201 | if (TripCount) { |
| 202 | if (ConstantInt *TripCountC = dyn_cast<ConstantInt>(TripCount)) { |
| 203 | // Guard against huge trip counts. |
| 204 | if (TripCountC->getValue().getActiveBits() <= 32) { |
| 205 | return (unsigned)TripCountC->getZExtValue(); |
| 206 | } |
| 207 | } |
| 208 | } |
| 209 | return 0; |
| 210 | } |
| 211 | |
| 212 | /// getSmallConstantTripMultiple - Returns the largest constant divisor of the |
| 213 | /// trip count of this loop as a normal unsigned value, if possible. This |
| 214 | /// means that the actual trip count is always a multiple of the returned |
| 215 | /// value (don't forget the trip count could very well be zero as well!). |
| 216 | /// |
| 217 | /// Returns 1 if the trip count is unknown or not guaranteed to be the |
| 218 | /// multiple of a constant (which is also the case if the trip count is simply |
| 219 | /// constant, use getSmallConstantTripCount for that case), Will also return 1 |
| 220 | /// if the trip count is very large (>= 2^32). |
| 221 | unsigned Loop::getSmallConstantTripMultiple() const { |
| 222 | Value* TripCount = this->getTripCount(); |
| 223 | // This will hold the ConstantInt result, if any |
| 224 | ConstantInt *Result = NULL; |
| 225 | if (TripCount) { |
| 226 | // See if the trip count is constant itself |
| 227 | Result = dyn_cast<ConstantInt>(TripCount); |
| 228 | // if not, see if it is a multiplication |
| 229 | if (!Result) |
| 230 | if (BinaryOperator *BO = dyn_cast<BinaryOperator>(TripCount)) { |
| 231 | switch (BO->getOpcode()) { |
| 232 | case BinaryOperator::Mul: |
| 233 | Result = dyn_cast<ConstantInt>(BO->getOperand(1)); |
| 234 | break; |
| 235 | default: |
| 236 | break; |
| 237 | } |
| 238 | } |
| 239 | } |
| 240 | // Guard against huge trip counts. |
| 241 | if (Result && Result->getValue().getActiveBits() <= 32) { |
| 242 | return (unsigned)Result->getZExtValue(); |
| 243 | } else { |
| 244 | return 1; |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | /// isLCSSAForm - Return true if the Loop is in LCSSA form |
| 249 | bool Loop::isLCSSAForm() const { |
| 250 | // Sort the blocks vector so that we can use binary search to do quick |
| 251 | // lookups. |
| 252 | SmallPtrSet<BasicBlock *, 16> LoopBBs(block_begin(), block_end()); |
| 253 | |
| 254 | for (block_iterator BI = block_begin(), E = block_end(); BI != E; ++BI) { |
| 255 | BasicBlock *BB = *BI; |
| 256 | for (BasicBlock ::iterator I = BB->begin(), E = BB->end(); I != E;++I) |
| 257 | for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; |
| 258 | ++UI) { |
| 259 | BasicBlock *UserBB = cast<Instruction>(*UI)->getParent(); |
| 260 | if (PHINode *P = dyn_cast<PHINode>(*UI)) { |
| 261 | UserBB = P->getIncomingBlock(UI); |
| 262 | } |
| 263 | |
| 264 | // Check the current block, as a fast-path. Most values are used in |
| 265 | // the same block they are defined in. |
| 266 | if (UserBB != BB && !LoopBBs.count(UserBB)) |
| 267 | return false; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | return true; |
| 272 | } |
Dan Gohman | 9377386 | 2009-07-16 16:16:23 +0000 | [diff] [blame] | 273 | |
| 274 | /// isLoopSimplifyForm - Return true if the Loop is in the form that |
| 275 | /// the LoopSimplify form transforms loops to, which is sometimes called |
| 276 | /// normal form. |
| 277 | bool Loop::isLoopSimplifyForm() const { |
| 278 | // Normal-form loops have a preheader. |
| 279 | if (!getLoopPreheader()) |
| 280 | return false; |
| 281 | // Normal-form loops have a single backedge. |
| 282 | if (!getLoopLatch()) |
| 283 | return false; |
| 284 | // Each predecessor of each exit block of a normal loop is contained |
| 285 | // within the loop. |
| 286 | SmallVector<BasicBlock *, 4> ExitBlocks; |
| 287 | getExitBlocks(ExitBlocks); |
| 288 | for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) |
| 289 | for (pred_iterator PI = pred_begin(ExitBlocks[i]), |
| 290 | PE = pred_end(ExitBlocks[i]); PI != PE; ++PI) |
| 291 | if (!contains(*PI)) |
| 292 | return false; |
| 293 | // All the requirements are met. |
| 294 | return true; |
| 295 | } |
| 296 | |
Dan Gohman | f0608d8 | 2009-09-03 16:10:48 +0000 | [diff] [blame^] | 297 | /// getUniqueExitBlocks - Return all unique successor blocks of this loop. |
| 298 | /// These are the blocks _outside of the current loop_ which are branched to. |
| 299 | /// This assumes that loop is in canonical form. |
| 300 | /// |
| 301 | void |
| 302 | Loop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock *> &ExitBlocks) const { |
| 303 | // Sort the blocks vector so that we can use binary search to do quick |
| 304 | // lookups. |
| 305 | SmallVector<BasicBlock *, 128> LoopBBs(block_begin(), block_end()); |
| 306 | std::sort(LoopBBs.begin(), LoopBBs.end()); |
| 307 | |
| 308 | std::vector<BasicBlock *> switchExitBlocks; |
| 309 | |
| 310 | for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI) { |
| 311 | |
| 312 | BasicBlock *current = *BI; |
| 313 | switchExitBlocks.clear(); |
| 314 | |
| 315 | typedef GraphTraits<BasicBlock *> BlockTraits; |
| 316 | typedef GraphTraits<Inverse<BasicBlock *> > InvBlockTraits; |
| 317 | for (BlockTraits::ChildIteratorType I = |
| 318 | BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI); |
| 319 | I != E; ++I) { |
| 320 | // If block is inside the loop then it is not a exit block. |
| 321 | if (std::binary_search(LoopBBs.begin(), LoopBBs.end(), *I)) |
| 322 | continue; |
| 323 | |
| 324 | InvBlockTraits::ChildIteratorType PI = InvBlockTraits::child_begin(*I); |
| 325 | BasicBlock *firstPred = *PI; |
| 326 | |
| 327 | // If current basic block is this exit block's first predecessor |
| 328 | // then only insert exit block in to the output ExitBlocks vector. |
| 329 | // This ensures that same exit block is not inserted twice into |
| 330 | // ExitBlocks vector. |
| 331 | if (current != firstPred) |
| 332 | continue; |
| 333 | |
| 334 | // If a terminator has more then two successors, for example SwitchInst, |
| 335 | // then it is possible that there are multiple edges from current block |
| 336 | // to one exit block. |
| 337 | if (std::distance(BlockTraits::child_begin(current), |
| 338 | BlockTraits::child_end(current)) <= 2) { |
| 339 | ExitBlocks.push_back(*I); |
| 340 | continue; |
| 341 | } |
| 342 | |
| 343 | // In case of multiple edges from current block to exit block, collect |
| 344 | // only one edge in ExitBlocks. Use switchExitBlocks to keep track of |
| 345 | // duplicate edges. |
| 346 | if (std::find(switchExitBlocks.begin(), switchExitBlocks.end(), *I) |
| 347 | == switchExitBlocks.end()) { |
| 348 | switchExitBlocks.push_back(*I); |
| 349 | ExitBlocks.push_back(*I); |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | /// getUniqueExitBlock - If getUniqueExitBlocks would return exactly one |
| 356 | /// block, return that block. Otherwise return null. |
| 357 | BasicBlock *Loop::getUniqueExitBlock() const { |
| 358 | SmallVector<BasicBlock *, 8> UniqueExitBlocks; |
| 359 | getUniqueExitBlocks(UniqueExitBlocks); |
| 360 | if (UniqueExitBlocks.size() == 1) |
| 361 | return UniqueExitBlocks[0]; |
| 362 | return 0; |
| 363 | } |
| 364 | |
Chris Lattner | a59cbb2 | 2002-07-27 01:12:17 +0000 | [diff] [blame] | 365 | //===----------------------------------------------------------------------===// |
| 366 | // LoopInfo implementation |
| 367 | // |
Chris Lattner | a59cbb2 | 2002-07-27 01:12:17 +0000 | [diff] [blame] | 368 | bool LoopInfo::runOnFunction(Function &) { |
| 369 | releaseMemory(); |
Dan Gohman | 9d59d9f | 2009-06-27 21:22:48 +0000 | [diff] [blame] | 370 | LI.Calculate(getAnalysis<DominatorTree>().getBase()); // Update |
Chris Lattner | a59cbb2 | 2002-07-27 01:12:17 +0000 | [diff] [blame] | 371 | return false; |
| 372 | } |
| 373 | |
Chris Lattner | 1b7f7dc | 2002-04-28 16:21:30 +0000 | [diff] [blame] | 374 | void LoopInfo::getAnalysisUsage(AnalysisUsage &AU) const { |
Chris Lattner | f57b845 | 2002-04-27 06:56:12 +0000 | [diff] [blame] | 375 | AU.setPreservesAll(); |
Devang Patel | 53c279b | 2007-06-08 00:17:13 +0000 | [diff] [blame] | 376 | AU.addRequired<DominatorTree>(); |
Chris Lattner | 93193f8 | 2002-01-31 00:42:27 +0000 | [diff] [blame] | 377 | } |
Chris Lattner | 791102f | 2009-08-23 05:17:37 +0000 | [diff] [blame] | 378 | |
Chris Lattner | 45cfe54 | 2009-08-23 06:03:38 +0000 | [diff] [blame] | 379 | void LoopInfo::print(raw_ostream &OS, const Module*) const { |
| 380 | LI.print(OS); |
Chris Lattner | 791102f | 2009-08-23 05:17:37 +0000 | [diff] [blame] | 381 | } |
| 382 | |