LLVM  4.0.0
Public Member Functions | Friends | List of all members
llvm::LoopInfo Class Reference

#include <LoopInfo.h>

Inheritance diagram for llvm::LoopInfo:
[legend]
Collaboration diagram for llvm::LoopInfo:
[legend]

Public Member Functions

 LoopInfo ()
 
 LoopInfo (const DominatorTreeBase< BasicBlock > &DomTree)
 
 LoopInfo (LoopInfo &&Arg)
 
LoopInfooperator= (LoopInfo &&RHS)
 
void markAsRemoved (Loop *L)
 Update LoopInfo after removing the last backedge from a loop. More...
 
bool replacementPreservesLCSSAForm (Instruction *From, Value *To)
 Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form. More...
 
bool movementPreservesLCSSAForm (Instruction *Inst, Instruction *NewLoc)
 Checks if moving a specific instruction can break LCSSA in any loop. More...
 
- Public Member Functions inherited from llvm::LoopInfoBase< BasicBlock, Loop >
LoopInfoBaseoperator= (LoopInfoBase &&RHS)
 
 LoopInfoBase ()
 
 LoopInfoBase (LoopInfoBase &&Arg)
 
 ~LoopInfoBase ()
 
void releaseMemory ()
 
iterator begin () const
 
iterator end () const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 
bool empty () const
 
LoopT * getLoopFor (const BlockT *BB) const
 Return the inner most loop that BB lives in. More...
 
const LoopT * operator[] (const BlockT *BB) const
 Same as getLoopFor. More...
 
unsigned getLoopDepth (const BlockT *BB) const
 Return the loop nesting level of the specified block. More...
 
bool isLoopHeader (const BlockT *BB) const
 
LoopT * removeLoop (iterator I)
 This removes the specified top-level loop from this loop info object. More...
 
void changeLoopFor (BlockT *BB, LoopT *L)
 Change the top-level loop that contains BB to the specified loop. More...
 
void changeTopLevelLoop (LoopT *OldLoop, LoopT *NewLoop)
 Replace the specified loop in the top-level loops list with the indicated loop. More...
 
void addTopLevelLoop (LoopT *New)
 This adds the specified loop to the collection of top-level loops. More...
 
void removeBlock (BlockT *BB)
 This method completely removes BB from all data structures, including all of the Loop objects it is nested in and our mapping from BasicBlocks to loops. More...
 
void analyze (const DominatorTreeBase< BlockT > &DomTree)
 Create the loop forest using a stable algorithm. More...
 
void print (raw_ostream &OS) const
 
void verify (const DominatorTreeBase< BlockT > &DomTree) const
 

Friends

class LoopBase< BasicBlock, Loop >
 

Additional Inherited Members

- Public Types inherited from llvm::LoopInfoBase< BasicBlock, Loop >
typedef std::vector< LoopT * >
::const_iterator 
iterator
 iterator/begin/end - The interface to the top-level loops in the current function. More...
 
typedef std::vector< LoopT * >
::const_reverse_iterator 
reverse_iterator
 
- Static Public Member Functions inherited from llvm::LoopInfoBase< BasicBlock, Loop >
static bool isNotAlreadyContainedIn (const LoopT *SubLoop, const LoopT *ParentLoop)
 

Detailed Description

Definition at line 668 of file LoopInfo.h.

Constructor & Destructor Documentation

llvm::LoopInfo::LoopInfo ( )
inline

Definition at line 676 of file LoopInfo.h.

LoopInfo::LoopInfo ( const DominatorTreeBase< BasicBlock > &  DomTree)
explicit

Definition at line 609 of file LoopInfo.cpp.

References llvm::LoopInfoBase< BasicBlock, Loop >::analyze().

llvm::LoopInfo::LoopInfo ( LoopInfo &&  Arg)
inline

Definition at line 679 of file LoopInfo.h.

Member Function Documentation

void LoopInfo::markAsRemoved ( Loop L)
bool llvm::LoopInfo::movementPreservesLCSSAForm ( Instruction Inst,
Instruction NewLoc 
)
inline

Checks if moving a specific instruction can break LCSSA in any loop.

Return true if moving Inst to before NewLoc will break LCSSA, assuming that the function containing Inst and NewLoc is currently in LCSSA form.

Definition at line 719 of file LoopInfo.h.

References assert(), llvm::LoopBase< N, M >::contains(), llvm::dyn_cast(), llvm::Instruction::getFunction(), llvm::Instruction::getParent(), llvm::User::operands(), and llvm::Value::uses().

LoopInfo& llvm::LoopInfo::operator= ( LoopInfo &&  RHS)
inline

Definition at line 680 of file LoopInfo.h.

bool llvm::LoopInfo::replacementPreservesLCSSAForm ( Instruction From,
Value To 
)
inline

Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form.

Definition at line 695 of file LoopInfo.h.

References llvm::LoopBase< N, M >::contains(), llvm::dyn_cast(), llvm::Instruction::getParent(), and I.

Referenced by SimplifyLoopInst(), simplifyOneLoop(), and llvm::UnrollLoop().

Friends And Related Function Documentation

friend class LoopBase< BasicBlock, Loop >
friend

Definition at line 671 of file LoopInfo.h.


The documentation for this class was generated from the following files: