class GenericCycle

Declaration

template <typename ContextT>
class GenericCycle { /* full declaration omitted */ };

Description

A possibly irreducible generalization of a \ref Loop.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:48

Templates

ContextT

Member Variables

private GenericCycle<ContextT>* ParentCycle = nullptr
The parent cycle. Is null for the root "cycle". Top-level cycles point at the root.
private SmallVector<llvm::GenericCycle::BlockT*, 1> Entries
The entry block(s) of the cycle. The header is the only entry if this is a loop. Is empty for the root "cycle", to avoid unnecessary memory use.
private std::vector< std::unique_ptr<GenericCycle<ContextT>>> Children
Child cycles, if any.
private std::vector<BlockT*> Blocks
Basic blocks that are contained in the cycle, including entry blocks, and including blocks that are part of a child cycle.
private unsigned int Depth = 0

Method Overview

Methods

GenericCycle<ContextT>(
    const GenericCycle<ContextT>&)

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:90

Parameters

const GenericCycle<ContextT>&

GenericCycle<ContextT>(
    GenericCycle<ContextT>&& Rhs)

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:92

Parameters

GenericCycle<ContextT>&& Rhs

GenericCycle<ContextT>()

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:96

void appendBlock(
    llvm::GenericCycle::BlockT* Block)

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:88

Parameters

llvm::GenericCycle::BlockT* Block

void appendEntry(
    llvm::GenericCycle::BlockT* Block)

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:87

Parameters

llvm::GenericCycle::BlockT* Block

llvm::GenericCycle::const_block_iterator
block_begin() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:174

llvm::GenericCycle::const_block_iterator
block_end() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:177

iterator_range<
    llvm::GenericCycle::const_block_iterator>
blocks() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:181

llvm::GenericCycle::const_child_iterator
child_begin() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:157

llvm::GenericCycle::const_child_iterator
child_end() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:160

iterator_range<
    llvm::GenericCycle::const_child_iterator>
children() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:164

void clear()

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:79

bool contains(
    const llvm::GenericCycle::BlockT* Block) const

Description

Return whether \p Block is contained in the cycle.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:111

Parameters

const llvm::GenericCycle::BlockT* Block

bool contains(
    const GenericCycle<ContextT>* C) const

Description

Returns true iff this cycle contains \p C.

Note: Non-strict containment check, i.e. returns true if C is the same cycle.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:119

Parameters

const GenericCycle<ContextT>* C

iterator_range<
    llvm::GenericCycle::const_entry_iterator>
entries() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:192

llvm::GenericCycle::BlockT* getCyclePredecessor()
    const

Description

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

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:139

llvm::GenericCycle::BlockT* getCyclePreheader()
    const

Description

Return the preheader block for this cycle. Pre-header is well-defined for reducible cycle in docs/LoopTerminology.rst as: the only one entering block and its only edge is to the entry block. Return null for irreducible cycles.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:135

unsigned int getDepth() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:123

const SmallVectorImpl<
    llvm::GenericCycle::BlockT*>&
getEntries() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:103

void getExitBlocks(
    SmallVectorImpl<llvm::GenericCycle::BlockT*>&
        TmpStorage) const

Description

Return all of the successor blocks of this cycle. These are the blocks _outside of the current cycle_ which are branched to.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:129

Parameters

SmallVectorImpl<llvm::GenericCycle::BlockT*>& TmpStorage

llvm::GenericCycle::BlockT* getHeader() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:101

size_t getNumBlocks() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:180

size_t getNumChildren() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:163

size_t getNumEntries() const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:191

GenericCycle<ContextT>* getParentCycle()

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:122

const GenericCycle<ContextT>* getParentCycle()
    const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:121

bool isEntry(
    llvm::GenericCycle::BlockT* Block) const

Description

Return whether \p Block is an entry block of the cycle.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:108

Parameters

llvm::GenericCycle::BlockT* Block

bool isReducible() const

Description

Whether the cycle is a natural loop.

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:99

llvm::Printable print(const ContextT& Ctx) const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:209

Parameters

const ContextT& Ctx

llvm::Printable printEntries(
    const ContextT& Ctx) const

Declared at: llvm/include/llvm/ADT/GenericCycleInfo.h:197

Parameters

const ContextT& Ctx