LLVM 23.0.0git
llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward > Class Template Reference

Iterator to traverse all successors/predecessors of a VPBlockBase node, including its hierarchical successors/predecessors: More...

#include "Transforms/Vectorize/VPlanCFG.h"

Inheritance diagram for llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >:
[legend]

Public Types

using reference = BlockPtrTy
 Used by iterator_facade_base with bidirectional_iterator_tag.
Public Types inherited from llvm::iterator_facade_base< VPHierarchicalChildrenIterator< BlockPtrTy, true >, std::bidirectional_iterator_tag, VPBlockBase >
enum  
using iterator_category
using value_type
using difference_type
using pointer
using reference

Public Member Functions

 VPHierarchicalChildrenIterator (BlockPtrTy Block, size_t Idx=0)
 VPHierarchicalChildrenIterator (const VPHierarchicalChildrenIterator &Other)
VPHierarchicalChildrenIteratoroperator= (const VPHierarchicalChildrenIterator &R)
bool operator== (const VPHierarchicalChildrenIterator &R) const
const VPBlockBaseoperator* () const
BlockPtrTy operator* ()
VPHierarchicalChildrenIteratoroperator++ ()
VPHierarchicalChildrenIteratoroperator-- ()
VPHierarchicalChildrenIterator operator++ (int X)
Public Member Functions inherited from llvm::iterator_facade_base< VPHierarchicalChildrenIterator< BlockPtrTy, true >, std::bidirectional_iterator_tag, VPBlockBase >
VPHierarchicalChildrenIterator< BlockPtrTy, true > operator+ (std::ptrdiff_t n) const
VPHierarchicalChildrenIterator< BlockPtrTy, true > operator- (std::ptrdiff_t n) const
VPHierarchicalChildrenIterator< BlockPtrTy, true > & operator++ ()
VPHierarchicalChildrenIterator< BlockPtrTy, true > & operator-- ()
bool operator!= (const VPHierarchicalChildrenIterator< BlockPtrTy, true > &RHS) const
bool operator> (const VPHierarchicalChildrenIterator< BlockPtrTy, true > &RHS) const
bool operator<= (const VPHierarchicalChildrenIterator< BlockPtrTy, true > &RHS) const
bool operator>= (const VPHierarchicalChildrenIterator< BlockPtrTy, true > &RHS) const
PointerProxy operator-> () const
ReferenceProxy operator[] (std::ptrdiff_t n) const

Static Public Member Functions

static VPHierarchicalChildrenIterator end (BlockPtrTy Block)

Detailed Description

template<typename BlockPtrTy, bool Forward = true>
class llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >

Iterator to traverse all successors/predecessors of a VPBlockBase node, including its hierarchical successors/predecessors:

A
|

+--—+ <- Region R

b
...
e

+--—+ | B

Forward == true: Region blocks themselves traverse only their entries directly. Region's successor is implictly traversed when processing its exiting block. children(A) == {R} children(R) == {b} children(e) == {B}

Forward == false: Region blocks themselves traverse only their exiting blocks directly. Region's predecessor is implicitly traversed when processing its entry block. children(B) == {R} children(R) == {e} children(b) == {A}

The scheme described above ensures that all blocks of the region are visited before continuing traversal outside the region when doing a reverse post-order traversal of the VPlan.

Definition at line 63 of file VPlanCFG.h.

Member Typedef Documentation

◆ reference

template<typename BlockPtrTy, bool Forward = true>
using llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::reference = BlockPtrTy

Used by iterator_facade_base with bidirectional_iterator_tag.

Definition at line 111 of file VPlanCFG.h.

Constructor & Destructor Documentation

◆ VPHierarchicalChildrenIterator() [1/2]

template<typename BlockPtrTy, bool Forward = true>
llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::VPHierarchicalChildrenIterator ( BlockPtrTy Block,
size_t Idx = 0 )
inline

Definition at line 113 of file VPlanCFG.h.

◆ VPHierarchicalChildrenIterator() [2/2]

template<typename BlockPtrTy, bool Forward = true>
llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::VPHierarchicalChildrenIterator ( const VPHierarchicalChildrenIterator< BlockPtrTy, Forward > & Other)
inline

Definition at line 115 of file VPlanCFG.h.

Member Function Documentation

◆ end()

template<typename BlockPtrTy, bool Forward = true>
VPHierarchicalChildrenIterator llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::end ( BlockPtrTy Block)
inlinestatic

Definition at line 125 of file VPlanCFG.h.

◆ operator*() [1/2]

template<typename BlockPtrTy, bool Forward = true>
BlockPtrTy llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator* ( )
inline

Definition at line 143 of file VPlanCFG.h.

◆ operator*() [2/2]

template<typename BlockPtrTy, bool Forward = true>
const VPBlockBase * llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator* ( ) const
inline

Definition at line 141 of file VPlanCFG.h.

◆ operator++() [1/2]

template<typename BlockPtrTy, bool Forward = true>
VPHierarchicalChildrenIterator & llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator++ ( )
inline

Definition at line 145 of file VPlanCFG.h.

◆ operator++() [2/2]

template<typename BlockPtrTy, bool Forward = true>
VPHierarchicalChildrenIterator llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator++ ( int X)
inline

Definition at line 155 of file VPlanCFG.h.

◆ operator--()

template<typename BlockPtrTy, bool Forward = true>
VPHierarchicalChildrenIterator & llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator-- ( )
inline

Definition at line 150 of file VPlanCFG.h.

◆ operator=()

template<typename BlockPtrTy, bool Forward = true>
VPHierarchicalChildrenIterator & llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator= ( const VPHierarchicalChildrenIterator< BlockPtrTy, Forward > & R)
inline

Definition at line 119 of file VPlanCFG.h.

◆ operator==()

template<typename BlockPtrTy, bool Forward = true>
bool llvm::VPHierarchicalChildrenIterator< BlockPtrTy, Forward >::operator== ( const VPHierarchicalChildrenIterator< BlockPtrTy, Forward > & R) const
inline

Definition at line 137 of file VPlanCFG.h.


The documentation for this class was generated from the following file: