30 #ifndef LLVM_CODEGEN_MACHINELOOPINFO_H
31 #define LLVM_CODEGEN_MACHINELOOPINFO_H
41 extern template class LoopBase<MachineBasicBlock, MachineLoop>;
72 extern template class LoopInfoBase<MachineBasicBlock, MachineLoop>;
96 bool SpeculativePreheader =
false)
const;
101 inline iterator
end()
const {
return LI.
end(); }
const MachineLoop * NodeRef
unsigned getLoopDepth(const BlockT *BB) const
Return the loop nesting level of the specified block.
static NodeRef getEntryNode(MachineLoop *L)
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void removeBlock(BlockT *BB)
This method completely removes BB from all data structures, including all of the Loop objects it is n...
LoopT * removeLoop(iterator I)
This removes the specified top-level loop from this loop info object.
bool isLoopHeader(const BlockT *BB) const
void addTopLevelLoop(MachineLoop *New)
This adds the specified loop to the collection of top-level loops.
void changeLoopFor(BlockT *BB, LoopT *L)
Change the top-level loop that contains BB to the specified loop.
LoopT * getLoopFor(const BlockT *BB) const
Return the inner most loop that BB lives in.
void initializeMachineLoopInfoPass(PassRegistry &)
std::vector< LoopT * >::const_iterator iterator
iterator/begin/end - The interface to the top-level loops in the current function.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void removeBlock(MachineBasicBlock *BB)
This method completely removes BB from all data structures, including all of the Loop objects it is n...
static ChildIteratorType child_begin(NodeRef N)
MachineLoopInfo::iterator ChildIteratorType
void changeTopLevelLoop(MachineLoop *OldLoop, MachineLoop *NewLoop)
Replace the specified loop in the top-level loops list with the indicated loop.
MachineLoop * getLoopFor(const MachineBasicBlock *BB) const
Return the innermost loop that BB lives in.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
const MachineLoop * operator[](const MachineBasicBlock *BB) const
Same as getLoopFor.
Represent the analysis usage information of a pass.
static ChildIteratorType child_begin(NodeRef N)
static ChildIteratorType child_end(NodeRef N)
void addTopLevelLoop(LoopT *New)
This adds the specified loop to the collection of top-level loops.
MachineLoopInfo::iterator ChildIteratorType
static NodeRef getEntryNode(const MachineLoop *L)
MachineLoop * removeLoop(iterator I)
This removes the specified top-level loop from this loop info object.
void changeLoopFor(MachineBasicBlock *BB, MachineLoop *L)
Change the top-level loop that contains BB to the specified loop.
static ChildIteratorType child_end(NodeRef N)
bool isLoopHeader(const MachineBasicBlock *BB) const
True if the block is a loop header node.
unsigned getLoopDepth(const MachineBasicBlock *BB) const
Return the loop nesting level of the specified block.
void changeTopLevelLoop(LoopT *OldLoop, LoopT *NewLoop)
Replace the specified loop in the top-level loops list with the indicated loop.
LoopInfoBase< MachineBasicBlock, MachineLoop >::iterator iterator
The iterator interface to the top-level loops in the current function.
This class builds and contains all of the top-level loop structures in the specified function...
LoopInfoBase< MachineBasicBlock, MachineLoop > & getBase()