class LoopInfoBase

Declaration

template <class BlockT, class LoopT>
class LoopInfoBase { /* full declaration omitted */ };

Description

This class builds and contains all of the top-level loop structures in the specified function.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:859

Templates

BlockT
LoopT

Method Overview

Methods

template <typename... ArgsTy>
LoopT* AllocateLoop(ArgsTy&&... Args)

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:903

Templates

ArgsTy

Parameters

ArgsTy&&... Args

LoopInfoBase<N, M>(LoopInfoBase<N, M>&& Arg)

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:875

Parameters

LoopInfoBase<N, M>&& Arg

LoopInfoBase<N, M>()

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:872

void addTopLevelLoop(LoopT* New)

Description

This adds the specified loop to the collection of top-level loops.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:990

Parameters

LoopT* New

void analyze(
    const DominatorTreeBase<BlockT, false>&
        DomTree)

Description

Create the loop forest using a stable algorithm.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1020

Parameters

const DominatorTreeBase<BlockT, false>& DomTree

llvm::LoopInfoBase::iterator begin() const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:914

void changeLoopFor(BlockT* BB, LoopT* L)

Description

Change the top-level loop that contains BB to the specified loop. This should be used by transformations that restructure the loop hierarchy tree.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:971

Parameters

BlockT* BB
LoopT* L

void changeTopLevelLoop(LoopT* OldLoop,
                        LoopT* NewLoop)

Description

Replace the specified loop in the top-level loops list with the indicated loop.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:981

Parameters

LoopT* OldLoop
LoopT* NewLoop

void destroy(LoopT* L)

Description

Destroy a loop that has been removed from the `LoopInfo` nest. This runs the destructor of the loop object making it invalid to reference afterward. The memory is retained so that the *pointer* to the loop remains valid. The caller is responsible for removing this loop from the loop nest and otherwise disconnecting it from the broader `LoopInfo` data structures. Callers that don't naturally handle this themselves should probably call `erase' instead.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1037

Parameters

LoopT* L

bool empty() const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:918

llvm::LoopInfoBase::iterator end() const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:915

unsigned int getLoopDepth(const BlockT* BB) const

Description

Return the loop nesting level of the specified block. A depth of 0 means the block is not inside any loop.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:946

Parameters

const BlockT* BB

LoopT* getLoopFor(const BlockT* BB) const

Description

Return the inner most loop that BB lives in. If a basic block is in no loop (for example the entry node), null is returned.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:939

Parameters

const BlockT* BB

SmallVector<LoopT*, 4> getLoopsInPreorder()

Description

Return all of the loops in the function in preorder across the loop nests, with siblings in forward program order. Note that because loops form a forest of trees, preorder is equivalent to reverse postorder.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:925

SmallVector<LoopT*, 4>
getLoopsInReverseSiblingPreorder()

Description

Return all of the loops in the function in preorder across the loop nests, with siblings in *reverse* program order. Note that because loops form a forest of trees, preorder is equivalent to reverse postorder. Also note that this is *not* a reverse preorder. Only the siblings are in reverse program order.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:935

bool isLoopHeader(const BlockT* BB) const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:952

Parameters

const BlockT* BB

static bool isNotAlreadyContainedIn(
    const LoopT* SubLoop,
    const LoopT* ParentLoop)

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1010

Parameters

const LoopT* SubLoop
const LoopT* ParentLoop

void print(llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1023

Parameters

llvm::raw_ostream& OS

llvm::LoopInfoBase::reverse_iterator rbegin()
    const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:916

void releaseMemory()

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:894

void removeBlock(BlockT* BB)

Description

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.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:998

Parameters

BlockT* BB

LoopT* removeLoop(llvm::LoopInfoBase::iterator I)

Description

This removes the specified top-level loop from this loop info object. The loop is not deleted, as it will presumably be inserted into another loop.

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:960

Parameters

llvm::LoopInfoBase::iterator I

llvm::LoopInfoBase::reverse_iterator rend() const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:917

void verify(
    const DominatorTreeBase<BlockT, false>&
        DomTree) const

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1025

Parameters

const DominatorTreeBase<BlockT, false>& DomTree

~LoopInfoBase<N, M>()

Declared at: llvm/include/llvm/Analysis/LoopInfo.h:873