LLVM 20.0.0git
|
Construct a specially modified post-order traversal of cycles. More...
#include "llvm/ADT/GenericUniformityImpl.h"
Public Types | |
using | BlockT = typename ContextT::BlockT |
using | FunctionT = typename ContextT::FunctionT |
using | DominatorTreeT = typename ContextT::DominatorTreeT |
using | CycleInfoT = GenericCycleInfo< ContextT > |
using | CycleT = typename CycleInfoT::CycleT |
using | const_iterator = typename std::vector< BlockT * >::const_iterator |
Public Member Functions | |
ModifiedPostOrder (const ContextT &C) | |
bool | empty () const |
size_t | size () const |
void | clear () |
void | compute (const CycleInfoT &CI) |
Generically compute the modified post order. | |
unsigned | count (BlockT *BB) const |
const BlockT * | operator[] (size_t idx) const |
void | appendBlock (const BlockT &BB, bool isReducibleCycleHeader=false) |
unsigned | getIndex (const BlockT *BB) const |
bool | isReducibleCycleHeader (const BlockT *BB) const |
Construct a specially modified post-order traversal of cycles.
The ModifiedPO is contructed using a virtually modified CFG as follows:
Effectively, we produce a depth-first numbering with the following properties:
Effectively, the virtual modification arranges the nodes in a cycle as a DAG with the header as the sole leaf, and successors of the header as the roots. A reverse traversal of this numbering has the following invariant on the unmodified original CFG:
Each node is visited after all its predecessors, except if that predecessor is the cycle header.
Definition at line 86 of file GenericUniformityImpl.h.
using llvm::ModifiedPostOrder< ContextT >::BlockT = typename ContextT::BlockT |
Definition at line 88 of file GenericUniformityImpl.h.
using llvm::ModifiedPostOrder< ContextT >::const_iterator = typename std::vector<BlockT *>::const_iterator |
Definition at line 94 of file GenericUniformityImpl.h.
using llvm::ModifiedPostOrder< ContextT >::CycleInfoT = GenericCycleInfo<ContextT> |
Definition at line 92 of file GenericUniformityImpl.h.
using llvm::ModifiedPostOrder< ContextT >::CycleT = typename CycleInfoT::CycleT |
Definition at line 93 of file GenericUniformityImpl.h.
using llvm::ModifiedPostOrder< ContextT >::DominatorTreeT = typename ContextT::DominatorTreeT |
Definition at line 90 of file GenericUniformityImpl.h.
using llvm::ModifiedPostOrder< ContextT >::FunctionT = typename ContextT::FunctionT |
Definition at line 89 of file GenericUniformityImpl.h.
|
inline |
Definition at line 96 of file GenericUniformityImpl.h.
|
inline |
|
inline |
Definition at line 101 of file GenericUniformityImpl.h.
References llvm::SmallVectorImpl< T >::clear().
void llvm::ModifiedPostOrder< ContextT >::compute | ( | const CycleInfoT & | CI | ) |
Generically compute the modified post order.
Definition at line 1361 of file GenericUniformityImpl.h.
References F.
|
inline |
Definition at line 104 of file GenericUniformityImpl.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count().
|
inline |
Definition at line 98 of file GenericUniformityImpl.h.
References llvm::SmallVectorBase< Size_T >::empty().
|
inline |
Definition at line 116 of file GenericUniformityImpl.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
|
inline |
Definition at line 121 of file GenericUniformityImpl.h.
References llvm::SmallPtrSetImpl< PtrType >::contains().
Referenced by llvm::ModifiedPostOrder< ContextT >::appendBlock().
|
inline |
Definition at line 105 of file GenericUniformityImpl.h.
|
inline |
Definition at line 99 of file GenericUniformityImpl.h.
References llvm::SmallVectorBase< Size_T >::size().