llvm::MachineLoopInfo

Analysis that identifies natural loops in a machine function's CFG.

Synopsis

Declared in <llvm/CodeGen/MachineLoopInfo.h>

class MachineLoopInfo
    : public LoopInfoBase<MachineBasicBlock, MachineLoop>

Base Classes

NameDescription
LoopInfoBase<MachineBasicBlock, MachineLoop>Analysis that builds and owns the loop forest for a function.

Type Aliases

NameDescription
Edge Edge type.
iterator Iterator over the top-level loops in the current function.
reverse_iterator Reverse iterator over the top-level loops in the current function.

Member Functions

NameDescription
MachineLoopInfo [constructor]Constructors
operator= Assignment operators
AllocateLoop Allocate and construct a new empty loop owned by this LoopInfo.
addTopLevelLoop Add New to the collection of top-level loops.
analyze analyze overloads
begin Return an iterator to the first top-level loop.
calculate calculate overloads
changeLoopFor Change the innermost loop that contains BB to L.
changeTopLevelLoop Replace OldLoop with NewLoop in the top-level loops list.
destroy Destroy a loop that has been removed from the LoopInfo nest.
empty Return true if there are no top-level loops.
end Return an iterator past the last top-level loop.
findLoopPreheader Find a loop preheader, or a speculative preheader candidate.
getExitEdges Return all pairs of (inside_block,outside_block).
getLoopDepth Return the loop nesting level of the specified block.
getLoopFor Return the innermost loop that BB lives in.
getLoopsInPreorder Return all of the loops in the function in preorder across the loop nests, with siblings in forward program order.
getLoopsInReverseSiblingPreorder Return all of the loops in the function in preorder across the loop nests, with siblings in reverse program order.
getSmallestCommonLoop getSmallestCommonLoop overloads
getTopLevelLoops Return the top-level loops.
getUniqueLatchExitBlock Return the unique exit block for the latch of L, or null.
hasNoExitBlocks Return true if L does not have any exit blocks.
invalidate Handle invalidation explicitly.
isLoopHeader Return true if BB is a loop header.
operator[] Same as getLoopFor.
print Print the top-level loops and their nests to OS.
rbegin Return a reverse iterator to the last top-level loop.
releaseMemory Destroy all loops and clear block maps and layout storage.
removeBlock Completely remove BB from all loop data structures.
removeBlocksFromLoopAndAncestors Remove blocks satisfying Pred from Start and its ancestors.
removeBlocksIf Remove blocks satisfying Pred from L's block list.
removeLoop Remove the specified top-level loop from this loop info object.
rend Return a reverse iterator past the first top-level loop.
takeChildrenIf Detach and return children of Parent that satisfy Pred.
verify Verify the loop forest and block-to-loop mapping for consistency.

Static Member Functions

NameDescription
isNotAlreadyContainedIn Return true if SubLoop is not already contained in ParentLoop.

Friends

NameDescription
llvm::MachineLoopInfoWrapperPassThe legacy pass manager's analysis pass to compute machine loop information.
llvm::LoopBaseInstances of this class are used to represent loops that are detected in the flow graph.