Cycle information for a function.

Synopsis

Declared in <llvm/ADT/GenericCycleInfo.h>

template<typename ContextT>
class GenericCycleInfo;

Types

Name

Description

const_child_iterator

Iteration over child cycles, yielding handles.

Type Aliases

Name

Description

BlockT

Basic‐block type from the SSA context.

FunctionT

Function type from the SSA context.

const_toplevel_iterator

Iterator over top‐level (depth‐1) cycles.

Member Functions

Name

Description

GenericCycleInfo [constructor]

Constructors

operator=

Move‐assign cycle info, leaving the source empty.

addBlockToCycle

Add Block to innermost cycle C and all of its parents.

children

Return a range over the immediate child cycles of C.

clear

Reset the object to its initial state.

compute

Compute the cycle info for a function.

contains

contains overloads

cycles

All cycles in forest preorder.

dump

Dump the cycle forest to the debug stream.

getBlocks

Return the blocks of C, including those of nested cycles.

getCycle

Find the innermost cycle containing Block.

getCycleDepth

Return the depth of the innermost cycle containing Block, or 0 if it is not contained in any cycle.

getCyclePredecessor

If C has exactly one entry with exactly one predecessor, return it, otherwise return nullptr.

getCyclePreheader

Return the preheader block for cycle C, or null if none.

getDepth

Return the nesting depth of C (top‐level cycles have depth 1).

getEntries

Return the entry blocks of C (header first).

getExitBlocks

Return all of the successor blocks of C the blocks outside of C which are branched to from within it.

getExitingBlocks

Return all blocks of C that have a successor outside of C.

getFunction

Return the function this cycle info was computed for.

getHeader

Return the header (first entry) block of cycle C.

getNumBlocks

Return how many blocks (including nested cycles') belong to C.

getParentCycle

Return the parent of C, or an invalid handle for a top‐level cycle.

getSSAContext

Return the SSA context used to interpret blocks and values.

getSmallestCommonCycle

getSmallestCommonCycle overloads

getTopLevelParentCycle

Return the outermost cycle containing Block, or invalid if none.

isEntry

Return true if Block is an entry of cycle C.

isReducible

Return true if C has exactly one entry (reducible).

print

print overloads

printEntries

Return a printable view of the entry blocks of cycle C.

setSingleEntry

Record Block as the sole entry of reducible cycle C.

splitCriticalEdge

Update cycle membership after splitting edge Pred`to`Succ with New.

toplevel_begin

Return an iterator to the first top‐level cycle.

toplevel_cycles

Return a range over all top‐level (depth‐1) cycles.

toplevel_end

Return an iterator past the last top‐level cycle.

verify

Verify that the entire cycle tree well‐formed.

verifyCycle

Verify that C is actually a well‐formed cycle in the CFG.

verifyCycleNest

verifyCycleNest overloads

Friends

Name

Description

llvm::GenericCycleInfoCompute

Helper class for computing cycle information.

Derived Classes

Name

Description

CycleInfo

Cycle information for LLVM IR, specialized from GenericCycleInfo.

MachineCycleInfo

Cycle information specialized for Machine IR.

Created with MrDocs