LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT > Struct Template Reference

#include "llvm/Support/GenericDomTreeConstruction.h"

Classes

struct  BatchUpdateInfo
 
struct  BlockNamePrinter
 
struct  InfoRec
 
struct  InsertionInfo
 

Public Types

using NodePtr = typename DomTreeT::NodePtr
 
using NodeT = typename DomTreeT::NodeType
 
using TreeNodePtr = DomTreeNodeBase< NodeT > *
 
using RootsT = decltype(DomTreeT::Roots)
 
using GraphDiffT = GraphDiff< NodePtr, IsPostDom >
 
using UpdateT = typename DomTreeT::UpdateType
 
using UpdateKind = typename DomTreeT::UpdateKind
 
using BatchUpdatePtr = BatchUpdateInfo *
 
using NodeOrderMap = DenseMap< NodePtr, unsigned >
 

Public Member Functions

 SemiNCAInfo (BatchUpdatePtr BUI)
 
void clear ()
 
InfoRecgetNodeInfo (NodePtr BB)
 
NodePtr getIDom (NodePtr BB)
 
TreeNodePtr getNodeForBlock (NodePtr BB, DomTreeT &DT)
 
template<bool IsReverse = false, typename DescendCondition >
unsigned runDFS (NodePtr V, unsigned LastNum, DescendCondition Condition, unsigned AttachToNum, const NodeOrderMap *SuccOrder=nullptr)
 
unsigned eval (unsigned V, unsigned LastLinked, SmallVectorImpl< InfoRec * > &Stack, ArrayRef< InfoRec * > NumToInfo)
 
void runSemiNCA ()
 
void addVirtualRoot ()
 
template<typename DescendCondition >
void doFullDFSWalk (const DomTreeT &DT, DescendCondition DC)
 
void attachNewSubtree (DomTreeT &DT, const TreeNodePtr AttachTo)
 
void reattachExistingSubtree (DomTreeT &DT, const TreeNodePtr AttachTo)
 
bool verifyRoots (const DomTreeT &DT)
 
bool verifyReachability (const DomTreeT &DT)
 
bool verifyParentProperty (const DomTreeT &DT)
 
bool verifySiblingProperty (const DomTreeT &DT)
 

Static Public Member Functions

template<bool Inversed>
static SmallVector< NodePtr, 8 > getChildren (NodePtr N, BatchUpdatePtr BUI)
 
template<bool Inversed>
static SmallVector< NodePtr, 8 > getChildren (NodePtr N)
 
static bool AlwaysDescend (NodePtr, NodePtr)
 
static bool HasForwardSuccessors (const NodePtr N, BatchUpdatePtr BUI)
 
static NodePtr GetEntryNode (const DomTreeT &DT)
 
static RootsT FindRoots (const DomTreeT &DT, BatchUpdatePtr BUI)
 
static void RemoveRedundantRoots (const DomTreeT &DT, BatchUpdatePtr BUI, RootsT &Roots)
 
static void CalculateFromScratch (DomTreeT &DT, BatchUpdatePtr BUI)
 
static void InsertEdge (DomTreeT &DT, const BatchUpdatePtr BUI, const NodePtr From, const NodePtr To)
 
static bool UpdateRootsBeforeInsertion (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr From, const TreeNodePtr To)
 
static bool isPermutation (const SmallVectorImpl< NodePtr > &A, const SmallVectorImpl< NodePtr > &B)
 
static void UpdateRootsAfterUpdate (DomTreeT &DT, const BatchUpdatePtr BUI)
 
static void InsertReachable (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr From, const TreeNodePtr To)
 
static void UpdateInsertion (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr NCD, InsertionInfo &II)
 
static void InsertUnreachable (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr From, const NodePtr To)
 
static void ComputeUnreachableDominators (DomTreeT &DT, const BatchUpdatePtr BUI, const NodePtr Root, const TreeNodePtr Incoming, SmallVectorImpl< std::pair< NodePtr, TreeNodePtr > > &DiscoveredConnectingEdges)
 
static void DeleteEdge (DomTreeT &DT, const BatchUpdatePtr BUI, const NodePtr From, const NodePtr To)
 
static void DeleteReachable (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr FromTN, const TreeNodePtr ToTN)
 
static bool HasProperSupport (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr TN)
 
static void DeleteUnreachable (DomTreeT &DT, const BatchUpdatePtr BUI, const TreeNodePtr ToTN)
 
static void ApplyUpdates (DomTreeT &DT, GraphDiffT &PreViewCFG, GraphDiffT *PostViewCFG)
 
static void ApplyNextUpdate (DomTreeT &DT, BatchUpdateInfo &BUI)
 
static bool VerifyLevels (const DomTreeT &DT)
 
static bool VerifyDFSNumbers (const DomTreeT &DT)
 
static bool IsSameAsFreshTree (const DomTreeT &DT)
 

Public Attributes

SmallVector< NodePtr, 64 > NumToNode = {nullptr}
 
std::conditional_t< GraphHasNodeNumbers< NodePtr >, SmallVector< InfoRec, 64 >, DenseMap< NodePtr, InfoRec > > NodeInfos
 
BatchUpdateInfoBatchUpdates
 

Static Public Attributes

static constexpr bool IsPostDom = DomTreeT::IsPostDominator
 

Detailed Description

template<typename DomTreeT>
struct llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >

Definition at line 55 of file GenericDomTreeConstruction.h.

Member Typedef Documentation

◆ BatchUpdatePtr

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdatePtr = BatchUpdateInfo *

Definition at line 99 of file GenericDomTreeConstruction.h.

◆ GraphDiffT

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::GraphDiffT = GraphDiff<NodePtr, IsPostDom>

Definition at line 61 of file GenericDomTreeConstruction.h.

◆ NodeOrderMap

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodeOrderMap = DenseMap<NodePtr, unsigned>

Definition at line 182 of file GenericDomTreeConstruction.h.

◆ NodePtr

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodePtr = typename DomTreeT::NodePtr

Definition at line 56 of file GenericDomTreeConstruction.h.

◆ NodeT

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodeT = typename DomTreeT::NodeType

Definition at line 57 of file GenericDomTreeConstruction.h.

◆ RootsT

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::RootsT = decltype(DomTreeT::Roots)

Definition at line 59 of file GenericDomTreeConstruction.h.

◆ TreeNodePtr

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::TreeNodePtr = DomTreeNodeBase<NodeT> *

Definition at line 58 of file GenericDomTreeConstruction.h.

◆ UpdateKind

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateKind = typename DomTreeT::UpdateKind

Definition at line 83 of file GenericDomTreeConstruction.h.

◆ UpdateT

template<typename DomTreeT >
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateT = typename DomTreeT::UpdateType

Definition at line 82 of file GenericDomTreeConstruction.h.

Constructor & Destructor Documentation

◆ SemiNCAInfo()

template<typename DomTreeT >
llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::SemiNCAInfo ( BatchUpdatePtr  BUI)
inline

Definition at line 102 of file GenericDomTreeConstruction.h.

Member Function Documentation

◆ addVirtualRoot()

template<typename DomTreeT >
void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::addVirtualRoot ( )
inline

◆ AlwaysDescend()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::AlwaysDescend ( NodePtr  ,
NodePtr   
)
inlinestatic

◆ ApplyNextUpdate()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ApplyNextUpdate ( DomTreeT &  DT,
BatchUpdateInfo BUI 
)
inlinestatic

◆ ApplyUpdates()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ApplyUpdates ( DomTreeT &  DT,
GraphDiffT PreViewCFG,
GraphDiffT PostViewCFG 
)
inlinestatic

◆ attachNewSubtree()

template<typename DomTreeT >
void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::attachNewSubtree ( DomTreeT &  DT,
const TreeNodePtr  AttachTo 
)
inline

◆ CalculateFromScratch()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::CalculateFromScratch ( DomTreeT &  DT,
BatchUpdatePtr  BUI 
)
inlinestatic

◆ clear()

template<typename DomTreeT >
void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::clear ( )
inline

◆ ComputeUnreachableDominators()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ComputeUnreachableDominators ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const NodePtr  Root,
const TreeNodePtr  Incoming,
SmallVectorImpl< std::pair< NodePtr, TreeNodePtr > > &  DiscoveredConnectingEdges 
)
inlinestatic

◆ DeleteEdge()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteEdge ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const NodePtr  From,
const NodePtr  To 
)
inlinestatic

◆ DeleteReachable()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteReachable ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  FromTN,
const TreeNodePtr  ToTN 
)
inlinestatic

◆ DeleteUnreachable()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteUnreachable ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  ToTN 
)
inlinestatic

◆ doFullDFSWalk()

template<typename DomTreeT >
template<typename DescendCondition >
void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::doFullDFSWalk ( const DomTreeT &  DT,
DescendCondition  DC 
)
inline

◆ eval()

template<typename DomTreeT >
unsigned llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::eval ( unsigned  V,
unsigned  LastLinked,
SmallVectorImpl< InfoRec * > &  Stack,
ArrayRef< InfoRec * >  NumToInfo 
)
inline

◆ FindRoots()

template<typename DomTreeT >
static RootsT llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::FindRoots ( const DomTreeT &  DT,
BatchUpdatePtr  BUI 
)
inlinestatic

◆ getChildren() [1/2]

template<typename DomTreeT >
template<bool Inversed>
static SmallVector< NodePtr, 8 > llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::getChildren ( NodePtr  N)
inlinestatic

Definition at line 119 of file GenericDomTreeConstruction.h.

References llvm::erase(), and N.

◆ getChildren() [2/2]

template<typename DomTreeT >
template<bool Inversed>
static SmallVector< NodePtr, 8 > llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::getChildren ( NodePtr  N,
BatchUpdatePtr  BUI 
)
inlinestatic

◆ GetEntryNode()

template<typename DomTreeT >
static NodePtr llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::GetEntryNode ( const DomTreeT &  DT)
inlinestatic

◆ getIDom()

template<typename DomTreeT >
NodePtr llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::getIDom ( NodePtr  BB)
inline

◆ getNodeForBlock()

template<typename DomTreeT >
TreeNodePtr llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::getNodeForBlock ( NodePtr  BB,
DomTreeT &  DT 
)
inline

◆ getNodeInfo()

template<typename DomTreeT >
InfoRec & llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::getNodeInfo ( NodePtr  BB)
inline

◆ HasForwardSuccessors()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::HasForwardSuccessors ( const NodePtr  N,
BatchUpdatePtr  BUI 
)
inlinestatic

◆ HasProperSupport()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::HasProperSupport ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  TN 
)
inlinestatic

◆ InsertEdge()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InsertEdge ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const NodePtr  From,
const NodePtr  To 
)
inlinestatic

◆ InsertReachable()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InsertReachable ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  From,
const TreeNodePtr  To 
)
inlinestatic

◆ InsertUnreachable()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InsertUnreachable ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  From,
const NodePtr  To 
)
inlinestatic

◆ isPermutation()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::isPermutation ( const SmallVectorImpl< NodePtr > &  A,
const SmallVectorImpl< NodePtr > &  B 
)
inlinestatic

◆ IsSameAsFreshTree()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::IsSameAsFreshTree ( const DomTreeT &  DT)
inlinestatic

◆ reattachExistingSubtree()

template<typename DomTreeT >
void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::reattachExistingSubtree ( DomTreeT &  DT,
const TreeNodePtr  AttachTo 
)
inline

◆ RemoveRedundantRoots()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::RemoveRedundantRoots ( const DomTreeT &  DT,
BatchUpdatePtr  BUI,
RootsT Roots 
)
inlinestatic

◆ runDFS()

template<typename DomTreeT >
template<bool IsReverse = false, typename DescendCondition >
unsigned llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::runDFS ( NodePtr  V,
unsigned  LastNum,
DescendCondition  Condition,
unsigned  AttachToNum,
const NodeOrderMap SuccOrder = nullptr 
)
inline

◆ runSemiNCA()

template<typename DomTreeT >
void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::runSemiNCA ( )
inline

◆ UpdateInsertion()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateInsertion ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  NCD,
InsertionInfo II 
)
inlinestatic

◆ UpdateRootsAfterUpdate()

template<typename DomTreeT >
static void llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateRootsAfterUpdate ( DomTreeT &  DT,
const BatchUpdatePtr  BUI 
)
inlinestatic

◆ UpdateRootsBeforeInsertion()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateRootsBeforeInsertion ( DomTreeT &  DT,
const BatchUpdatePtr  BUI,
const TreeNodePtr  From,
const TreeNodePtr  To 
)
inlinestatic

◆ VerifyDFSNumbers()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::VerifyDFSNumbers ( const DomTreeT &  DT)
inlinestatic

◆ VerifyLevels()

template<typename DomTreeT >
static bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::VerifyLevels ( const DomTreeT &  DT)
inlinestatic

◆ verifyParentProperty()

template<typename DomTreeT >
bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyParentProperty ( const DomTreeT &  DT)
inline

◆ verifyReachability()

template<typename DomTreeT >
bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyReachability ( const DomTreeT &  DT)
inline

◆ verifyRoots()

template<typename DomTreeT >
bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyRoots ( const DomTreeT &  DT)
inline

◆ verifySiblingProperty()

template<typename DomTreeT >
bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifySiblingProperty ( const DomTreeT &  DT)
inline

Member Data Documentation

◆ BatchUpdates

template<typename DomTreeT >
BatchUpdateInfo* llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdates

◆ IsPostDom

template<typename DomTreeT >
constexpr bool llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::IsPostDom = DomTreeT::IsPostDominator
staticconstexpr

◆ NodeInfos

template<typename DomTreeT >
std::conditional_t<GraphHasNodeNumbers<NodePtr>, SmallVector<InfoRec, 64>, DenseMap<NodePtr, InfoRec> > llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodeInfos

◆ NumToNode

template<typename DomTreeT >
SmallVector<NodePtr, 64> llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NumToNode = {nullptr}

The documentation for this struct was generated from the following files: