LoopInfo.cpp revision 205218
1193323Sed//===- LoopInfo.cpp - Natural Loop Calculator -----------------------------===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed// 10193323Sed// This file defines the LoopInfo class that is used to identify natural loops 11193323Sed// and determine the loop depth of various nodes of the CFG. Note that the 12193323Sed// loops identified may actually be several natural loops that share the same 13193323Sed// header node... not just a single natural loop. 14193323Sed// 15193323Sed//===----------------------------------------------------------------------===// 16193323Sed 17193323Sed#include "llvm/Analysis/LoopInfo.h" 18193323Sed#include "llvm/Constants.h" 19193323Sed#include "llvm/Instructions.h" 20193323Sed#include "llvm/Analysis/Dominators.h" 21193323Sed#include "llvm/Assembly/Writer.h" 22193323Sed#include "llvm/Support/CFG.h" 23198090Srdivacky#include "llvm/Support/CommandLine.h" 24202375Srdivacky#include "llvm/Support/Debug.h" 25193323Sed#include "llvm/ADT/DepthFirstIterator.h" 26193323Sed#include "llvm/ADT/SmallPtrSet.h" 27193323Sed#include <algorithm> 28193323Sedusing namespace llvm; 29193323Sed 30198090Srdivacky// Always verify loopinfo if expensive checking is enabled. 31198090Srdivacky#ifdef XDEBUG 32198090Srdivackybool VerifyLoopInfo = true; 33198090Srdivacky#else 34198090Srdivackybool VerifyLoopInfo = false; 35198090Srdivacky#endif 36198090Srdivackystatic cl::opt<bool,true> 37198090SrdivackyVerifyLoopInfoX("verify-loop-info", cl::location(VerifyLoopInfo), 38198090Srdivacky cl::desc("Verify loop info (time consuming)")); 39198090Srdivacky 40193323Sedchar LoopInfo::ID = 0; 41193323Sedstatic RegisterPass<LoopInfo> 42193323SedX("loops", "Natural Loop Information", true, true); 43193323Sed 44193323Sed//===----------------------------------------------------------------------===// 45193323Sed// Loop implementation 46193323Sed// 47193323Sed 48198090Srdivacky/// isLoopInvariant - Return true if the specified value is loop invariant 49198090Srdivacky/// 50198090Srdivackybool Loop::isLoopInvariant(Value *V) const { 51198090Srdivacky if (Instruction *I = dyn_cast<Instruction>(V)) 52198090Srdivacky return isLoopInvariant(I); 53198090Srdivacky return true; // All non-instructions are loop invariant 54198090Srdivacky} 55198090Srdivacky 56198090Srdivacky/// isLoopInvariant - Return true if the specified instruction is 57198090Srdivacky/// loop-invariant. 58198090Srdivacky/// 59198090Srdivackybool Loop::isLoopInvariant(Instruction *I) const { 60201360Srdivacky return !contains(I); 61198090Srdivacky} 62198090Srdivacky 63198090Srdivacky/// makeLoopInvariant - If the given value is an instruciton inside of the 64198090Srdivacky/// loop and it can be hoisted, do so to make it trivially loop-invariant. 65198090Srdivacky/// Return true if the value after any hoisting is loop invariant. This 66198090Srdivacky/// function can be used as a slightly more aggressive replacement for 67198090Srdivacky/// isLoopInvariant. 68198090Srdivacky/// 69198090Srdivacky/// If InsertPt is specified, it is the point to hoist instructions to. 70198090Srdivacky/// If null, the terminator of the loop preheader is used. 71198090Srdivacky/// 72198090Srdivackybool Loop::makeLoopInvariant(Value *V, bool &Changed, 73198090Srdivacky Instruction *InsertPt) const { 74198090Srdivacky if (Instruction *I = dyn_cast<Instruction>(V)) 75198090Srdivacky return makeLoopInvariant(I, Changed, InsertPt); 76198090Srdivacky return true; // All non-instructions are loop-invariant. 77198090Srdivacky} 78198090Srdivacky 79198090Srdivacky/// makeLoopInvariant - If the given instruction is inside of the 80198090Srdivacky/// loop and it can be hoisted, do so to make it trivially loop-invariant. 81198090Srdivacky/// Return true if the instruction after any hoisting is loop invariant. This 82198090Srdivacky/// function can be used as a slightly more aggressive replacement for 83198090Srdivacky/// isLoopInvariant. 84198090Srdivacky/// 85198090Srdivacky/// If InsertPt is specified, it is the point to hoist instructions to. 86198090Srdivacky/// If null, the terminator of the loop preheader is used. 87198090Srdivacky/// 88198090Srdivackybool Loop::makeLoopInvariant(Instruction *I, bool &Changed, 89198090Srdivacky Instruction *InsertPt) const { 90198090Srdivacky // Test if the value is already loop-invariant. 91198090Srdivacky if (isLoopInvariant(I)) 92198090Srdivacky return true; 93198090Srdivacky if (!I->isSafeToSpeculativelyExecute()) 94198090Srdivacky return false; 95198090Srdivacky if (I->mayReadFromMemory()) 96198090Srdivacky return false; 97198090Srdivacky // Determine the insertion point, unless one was given. 98198090Srdivacky if (!InsertPt) { 99198090Srdivacky BasicBlock *Preheader = getLoopPreheader(); 100198090Srdivacky // Without a preheader, hoisting is not feasible. 101198090Srdivacky if (!Preheader) 102198090Srdivacky return false; 103198090Srdivacky InsertPt = Preheader->getTerminator(); 104198090Srdivacky } 105198090Srdivacky // Don't hoist instructions with loop-variant operands. 106198090Srdivacky for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) 107198090Srdivacky if (!makeLoopInvariant(I->getOperand(i), Changed, InsertPt)) 108198090Srdivacky return false; 109198090Srdivacky // Hoist. 110198090Srdivacky I->moveBefore(InsertPt); 111198090Srdivacky Changed = true; 112198090Srdivacky return true; 113198090Srdivacky} 114198090Srdivacky 115198090Srdivacky/// getCanonicalInductionVariable - Check to see if the loop has a canonical 116198090Srdivacky/// induction variable: an integer recurrence that starts at 0 and increments 117198090Srdivacky/// by one each time through the loop. If so, return the phi node that 118198090Srdivacky/// corresponds to it. 119198090Srdivacky/// 120198090Srdivacky/// The IndVarSimplify pass transforms loops to have a canonical induction 121198090Srdivacky/// variable. 122198090Srdivacky/// 123198090SrdivackyPHINode *Loop::getCanonicalInductionVariable() const { 124198090Srdivacky BasicBlock *H = getHeader(); 125198090Srdivacky 126198090Srdivacky BasicBlock *Incoming = 0, *Backedge = 0; 127198090Srdivacky typedef GraphTraits<Inverse<BasicBlock*> > InvBlockTraits; 128198090Srdivacky InvBlockTraits::ChildIteratorType PI = InvBlockTraits::child_begin(H); 129198090Srdivacky assert(PI != InvBlockTraits::child_end(H) && 130198090Srdivacky "Loop must have at least one backedge!"); 131198090Srdivacky Backedge = *PI++; 132198090Srdivacky if (PI == InvBlockTraits::child_end(H)) return 0; // dead loop 133198090Srdivacky Incoming = *PI++; 134198090Srdivacky if (PI != InvBlockTraits::child_end(H)) return 0; // multiple backedges? 135198090Srdivacky 136198090Srdivacky if (contains(Incoming)) { 137198090Srdivacky if (contains(Backedge)) 138198090Srdivacky return 0; 139198090Srdivacky std::swap(Incoming, Backedge); 140198090Srdivacky } else if (!contains(Backedge)) 141198090Srdivacky return 0; 142198090Srdivacky 143198090Srdivacky // Loop over all of the PHI nodes, looking for a canonical indvar. 144198090Srdivacky for (BasicBlock::iterator I = H->begin(); isa<PHINode>(I); ++I) { 145198090Srdivacky PHINode *PN = cast<PHINode>(I); 146198090Srdivacky if (ConstantInt *CI = 147198090Srdivacky dyn_cast<ConstantInt>(PN->getIncomingValueForBlock(Incoming))) 148198090Srdivacky if (CI->isNullValue()) 149198090Srdivacky if (Instruction *Inc = 150198090Srdivacky dyn_cast<Instruction>(PN->getIncomingValueForBlock(Backedge))) 151198090Srdivacky if (Inc->getOpcode() == Instruction::Add && 152198090Srdivacky Inc->getOperand(0) == PN) 153198090Srdivacky if (ConstantInt *CI = dyn_cast<ConstantInt>(Inc->getOperand(1))) 154198090Srdivacky if (CI->equalsInt(1)) 155198090Srdivacky return PN; 156198090Srdivacky } 157198090Srdivacky return 0; 158198090Srdivacky} 159198090Srdivacky 160198090Srdivacky/// getCanonicalInductionVariableIncrement - Return the LLVM value that holds 161198090Srdivacky/// the canonical induction variable value for the "next" iteration of the 162198090Srdivacky/// loop. This always succeeds if getCanonicalInductionVariable succeeds. 163198090Srdivacky/// 164198090SrdivackyInstruction *Loop::getCanonicalInductionVariableIncrement() const { 165198090Srdivacky if (PHINode *PN = getCanonicalInductionVariable()) { 166198090Srdivacky bool P1InLoop = contains(PN->getIncomingBlock(1)); 167198090Srdivacky return cast<Instruction>(PN->getIncomingValue(P1InLoop)); 168198090Srdivacky } 169198090Srdivacky return 0; 170198090Srdivacky} 171198090Srdivacky 172198090Srdivacky/// getTripCount - Return a loop-invariant LLVM value indicating the number of 173198090Srdivacky/// times the loop will be executed. Note that this means that the backedge 174198090Srdivacky/// of the loop executes N-1 times. If the trip-count cannot be determined, 175198090Srdivacky/// this returns null. 176198090Srdivacky/// 177198090Srdivacky/// The IndVarSimplify pass transforms loops to have a form that this 178198090Srdivacky/// function easily understands. 179198090Srdivacky/// 180198090SrdivackyValue *Loop::getTripCount() const { 181198090Srdivacky // Canonical loops will end with a 'cmp ne I, V', where I is the incremented 182198090Srdivacky // canonical induction variable and V is the trip count of the loop. 183198090Srdivacky Instruction *Inc = getCanonicalInductionVariableIncrement(); 184198090Srdivacky if (Inc == 0) return 0; 185198090Srdivacky PHINode *IV = cast<PHINode>(Inc->getOperand(0)); 186198090Srdivacky 187198090Srdivacky BasicBlock *BackedgeBlock = 188198090Srdivacky IV->getIncomingBlock(contains(IV->getIncomingBlock(1))); 189198090Srdivacky 190198090Srdivacky if (BranchInst *BI = dyn_cast<BranchInst>(BackedgeBlock->getTerminator())) 191198090Srdivacky if (BI->isConditional()) { 192198090Srdivacky if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { 193198090Srdivacky if (ICI->getOperand(0) == Inc) { 194198090Srdivacky if (BI->getSuccessor(0) == getHeader()) { 195198090Srdivacky if (ICI->getPredicate() == ICmpInst::ICMP_NE) 196198090Srdivacky return ICI->getOperand(1); 197198090Srdivacky } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) { 198198090Srdivacky return ICI->getOperand(1); 199198090Srdivacky } 200198090Srdivacky } 201198090Srdivacky } 202198090Srdivacky } 203198090Srdivacky 204198090Srdivacky return 0; 205198090Srdivacky} 206198090Srdivacky 207198090Srdivacky/// getSmallConstantTripCount - Returns the trip count of this loop as a 208198090Srdivacky/// normal unsigned value, if possible. Returns 0 if the trip count is unknown 209198090Srdivacky/// of not constant. Will also return 0 if the trip count is very large 210198090Srdivacky/// (>= 2^32) 211198090Srdivackyunsigned Loop::getSmallConstantTripCount() const { 212198090Srdivacky Value* TripCount = this->getTripCount(); 213198090Srdivacky if (TripCount) { 214198090Srdivacky if (ConstantInt *TripCountC = dyn_cast<ConstantInt>(TripCount)) { 215198090Srdivacky // Guard against huge trip counts. 216198090Srdivacky if (TripCountC->getValue().getActiveBits() <= 32) { 217198090Srdivacky return (unsigned)TripCountC->getZExtValue(); 218198090Srdivacky } 219198090Srdivacky } 220198090Srdivacky } 221198090Srdivacky return 0; 222198090Srdivacky} 223198090Srdivacky 224198090Srdivacky/// getSmallConstantTripMultiple - Returns the largest constant divisor of the 225198090Srdivacky/// trip count of this loop as a normal unsigned value, if possible. This 226198090Srdivacky/// means that the actual trip count is always a multiple of the returned 227198090Srdivacky/// value (don't forget the trip count could very well be zero as well!). 228198090Srdivacky/// 229198090Srdivacky/// Returns 1 if the trip count is unknown or not guaranteed to be the 230198090Srdivacky/// multiple of a constant (which is also the case if the trip count is simply 231198090Srdivacky/// constant, use getSmallConstantTripCount for that case), Will also return 1 232198090Srdivacky/// if the trip count is very large (>= 2^32). 233198090Srdivackyunsigned Loop::getSmallConstantTripMultiple() const { 234198090Srdivacky Value* TripCount = this->getTripCount(); 235198090Srdivacky // This will hold the ConstantInt result, if any 236198090Srdivacky ConstantInt *Result = NULL; 237198090Srdivacky if (TripCount) { 238198090Srdivacky // See if the trip count is constant itself 239198090Srdivacky Result = dyn_cast<ConstantInt>(TripCount); 240198090Srdivacky // if not, see if it is a multiplication 241198090Srdivacky if (!Result) 242198090Srdivacky if (BinaryOperator *BO = dyn_cast<BinaryOperator>(TripCount)) { 243198090Srdivacky switch (BO->getOpcode()) { 244198090Srdivacky case BinaryOperator::Mul: 245198090Srdivacky Result = dyn_cast<ConstantInt>(BO->getOperand(1)); 246198090Srdivacky break; 247199989Srdivacky case BinaryOperator::Shl: 248199989Srdivacky if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) 249199989Srdivacky if (CI->getValue().getActiveBits() <= 5) 250199989Srdivacky return 1u << CI->getZExtValue(); 251199989Srdivacky break; 252198090Srdivacky default: 253198090Srdivacky break; 254198090Srdivacky } 255198090Srdivacky } 256198090Srdivacky } 257198090Srdivacky // Guard against huge trip counts. 258198090Srdivacky if (Result && Result->getValue().getActiveBits() <= 32) { 259198090Srdivacky return (unsigned)Result->getZExtValue(); 260198090Srdivacky } else { 261198090Srdivacky return 1; 262198090Srdivacky } 263198090Srdivacky} 264198090Srdivacky 265198090Srdivacky/// isLCSSAForm - Return true if the Loop is in LCSSA form 266205218Srdivackybool Loop::isLCSSAForm(DominatorTree &DT) const { 267198090Srdivacky // Sort the blocks vector so that we can use binary search to do quick 268198090Srdivacky // lookups. 269198090Srdivacky SmallPtrSet<BasicBlock *, 16> LoopBBs(block_begin(), block_end()); 270198090Srdivacky 271198090Srdivacky for (block_iterator BI = block_begin(), E = block_end(); BI != E; ++BI) { 272199481Srdivacky BasicBlock *BB = *BI; 273199481Srdivacky for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;++I) 274198090Srdivacky for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; 275198090Srdivacky ++UI) { 276198090Srdivacky BasicBlock *UserBB = cast<Instruction>(*UI)->getParent(); 277199481Srdivacky if (PHINode *P = dyn_cast<PHINode>(*UI)) 278198090Srdivacky UserBB = P->getIncomingBlock(UI); 279198090Srdivacky 280204961Srdivacky // Check the current block, as a fast-path, before checking whether 281204961Srdivacky // the use is anywhere in the loop. Most values are used in the same 282204961Srdivacky // block they are defined in. Also, blocks not reachable from the 283204961Srdivacky // entry are special; uses in them don't need to go through PHIs. 284204961Srdivacky if (UserBB != BB && 285204961Srdivacky !LoopBBs.count(UserBB) && 286205218Srdivacky DT.isReachableFromEntry(UserBB)) 287198090Srdivacky return false; 288198090Srdivacky } 289198090Srdivacky } 290198090Srdivacky 291198090Srdivacky return true; 292198090Srdivacky} 293198090Srdivacky 294198090Srdivacky/// isLoopSimplifyForm - Return true if the Loop is in the form that 295198090Srdivacky/// the LoopSimplify form transforms loops to, which is sometimes called 296198090Srdivacky/// normal form. 297198090Srdivackybool Loop::isLoopSimplifyForm() const { 298199481Srdivacky // Normal-form loops have a preheader, a single backedge, and all of their 299199481Srdivacky // exits have all their predecessors inside the loop. 300199481Srdivacky return getLoopPreheader() && getLoopLatch() && hasDedicatedExits(); 301199481Srdivacky} 302199481Srdivacky 303199481Srdivacky/// hasDedicatedExits - Return true if no exit block for the loop 304199481Srdivacky/// has a predecessor that is outside the loop. 305199481Srdivackybool Loop::hasDedicatedExits() const { 306198396Srdivacky // Sort the blocks vector so that we can use binary search to do quick 307198396Srdivacky // lookups. 308198396Srdivacky SmallPtrSet<BasicBlock *, 16> LoopBBs(block_begin(), block_end()); 309198090Srdivacky // Each predecessor of each exit block of a normal loop is contained 310198090Srdivacky // within the loop. 311198090Srdivacky SmallVector<BasicBlock *, 4> ExitBlocks; 312198090Srdivacky getExitBlocks(ExitBlocks); 313198090Srdivacky for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) 314198090Srdivacky for (pred_iterator PI = pred_begin(ExitBlocks[i]), 315198090Srdivacky PE = pred_end(ExitBlocks[i]); PI != PE; ++PI) 316198396Srdivacky if (!LoopBBs.count(*PI)) 317198090Srdivacky return false; 318198090Srdivacky // All the requirements are met. 319198090Srdivacky return true; 320198090Srdivacky} 321198090Srdivacky 322198090Srdivacky/// getUniqueExitBlocks - Return all unique successor blocks of this loop. 323198090Srdivacky/// These are the blocks _outside of the current loop_ which are branched to. 324200581Srdivacky/// This assumes that loop exits are in canonical form. 325198090Srdivacky/// 326198090Srdivackyvoid 327198090SrdivackyLoop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock *> &ExitBlocks) const { 328200581Srdivacky assert(hasDedicatedExits() && 329200581Srdivacky "getUniqueExitBlocks assumes the loop has canonical form exits!"); 330198090Srdivacky 331198090Srdivacky // Sort the blocks vector so that we can use binary search to do quick 332198090Srdivacky // lookups. 333198090Srdivacky SmallVector<BasicBlock *, 128> LoopBBs(block_begin(), block_end()); 334198090Srdivacky std::sort(LoopBBs.begin(), LoopBBs.end()); 335198090Srdivacky 336198090Srdivacky SmallVector<BasicBlock *, 32> switchExitBlocks; 337198090Srdivacky 338198090Srdivacky for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI) { 339198090Srdivacky 340198090Srdivacky BasicBlock *current = *BI; 341198090Srdivacky switchExitBlocks.clear(); 342198090Srdivacky 343198090Srdivacky typedef GraphTraits<BasicBlock *> BlockTraits; 344198090Srdivacky typedef GraphTraits<Inverse<BasicBlock *> > InvBlockTraits; 345198090Srdivacky for (BlockTraits::ChildIteratorType I = 346198090Srdivacky BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI); 347198090Srdivacky I != E; ++I) { 348198090Srdivacky // If block is inside the loop then it is not a exit block. 349198090Srdivacky if (std::binary_search(LoopBBs.begin(), LoopBBs.end(), *I)) 350198090Srdivacky continue; 351198090Srdivacky 352198090Srdivacky InvBlockTraits::ChildIteratorType PI = InvBlockTraits::child_begin(*I); 353198090Srdivacky BasicBlock *firstPred = *PI; 354198090Srdivacky 355198090Srdivacky // If current basic block is this exit block's first predecessor 356198090Srdivacky // then only insert exit block in to the output ExitBlocks vector. 357198090Srdivacky // This ensures that same exit block is not inserted twice into 358198090Srdivacky // ExitBlocks vector. 359198090Srdivacky if (current != firstPred) 360198090Srdivacky continue; 361198090Srdivacky 362198090Srdivacky // If a terminator has more then two successors, for example SwitchInst, 363198090Srdivacky // then it is possible that there are multiple edges from current block 364198090Srdivacky // to one exit block. 365198090Srdivacky if (std::distance(BlockTraits::child_begin(current), 366198090Srdivacky BlockTraits::child_end(current)) <= 2) { 367198090Srdivacky ExitBlocks.push_back(*I); 368198090Srdivacky continue; 369198090Srdivacky } 370198090Srdivacky 371198090Srdivacky // In case of multiple edges from current block to exit block, collect 372198090Srdivacky // only one edge in ExitBlocks. Use switchExitBlocks to keep track of 373198090Srdivacky // duplicate edges. 374198090Srdivacky if (std::find(switchExitBlocks.begin(), switchExitBlocks.end(), *I) 375198090Srdivacky == switchExitBlocks.end()) { 376198090Srdivacky switchExitBlocks.push_back(*I); 377198090Srdivacky ExitBlocks.push_back(*I); 378198090Srdivacky } 379198090Srdivacky } 380198090Srdivacky } 381198090Srdivacky} 382198090Srdivacky 383198090Srdivacky/// getUniqueExitBlock - If getUniqueExitBlocks would return exactly one 384198090Srdivacky/// block, return that block. Otherwise return null. 385198090SrdivackyBasicBlock *Loop::getUniqueExitBlock() const { 386198090Srdivacky SmallVector<BasicBlock *, 8> UniqueExitBlocks; 387198090Srdivacky getUniqueExitBlocks(UniqueExitBlocks); 388198090Srdivacky if (UniqueExitBlocks.size() == 1) 389198090Srdivacky return UniqueExitBlocks[0]; 390198090Srdivacky return 0; 391198090Srdivacky} 392198090Srdivacky 393202375Srdivackyvoid Loop::dump() const { 394202375Srdivacky print(dbgs()); 395202375Srdivacky} 396202375Srdivacky 397193323Sed//===----------------------------------------------------------------------===// 398193323Sed// LoopInfo implementation 399193323Sed// 400193323Sedbool LoopInfo::runOnFunction(Function &) { 401193323Sed releaseMemory(); 402195340Sed LI.Calculate(getAnalysis<DominatorTree>().getBase()); // Update 403193323Sed return false; 404193323Sed} 405193323Sed 406198090Srdivackyvoid LoopInfo::verifyAnalysis() const { 407198090Srdivacky // LoopInfo is a FunctionPass, but verifying every loop in the function 408198090Srdivacky // each time verifyAnalysis is called is very expensive. The 409198090Srdivacky // -verify-loop-info option can enable this. In order to perform some 410198090Srdivacky // checking by default, LoopPass has been taught to call verifyLoop 411198090Srdivacky // manually during loop pass sequences. 412198090Srdivacky 413198090Srdivacky if (!VerifyLoopInfo) return; 414198090Srdivacky 415198090Srdivacky for (iterator I = begin(), E = end(); I != E; ++I) { 416198090Srdivacky assert(!(*I)->getParentLoop() && "Top-level loop has a parent!"); 417198090Srdivacky (*I)->verifyLoopNest(); 418198090Srdivacky } 419198090Srdivacky 420198090Srdivacky // TODO: check BBMap consistency. 421198090Srdivacky} 422198090Srdivacky 423193323Sedvoid LoopInfo::getAnalysisUsage(AnalysisUsage &AU) const { 424193323Sed AU.setPreservesAll(); 425193323Sed AU.addRequired<DominatorTree>(); 426193323Sed} 427198090Srdivacky 428198090Srdivackyvoid LoopInfo::print(raw_ostream &OS, const Module*) const { 429198090Srdivacky LI.print(OS); 430198090Srdivacky} 431198090Srdivacky 432