Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Public Types |Public Member Functions |Static Public Attributes |Protected Types |Protected Member Functions |Protected Attributes |Friends |List of all members
llvm::DominatorTreeBase< NodeT, IsPostDom > Class Template Reference

Core dominator tree base class.More...

#include "llvm/Support/GenericDomTree.h"

Inheritance diagram for llvm::DominatorTreeBase< NodeT, IsPostDom >:
Inheritance graph
[legend]

Public Types

enum class  VerificationLevel {Fast,Basic,Full }
 
using NodeTrait =DomTreeNodeTraits< NodeT >
 
using NodeType = typenameNodeTrait::NodeType
 
using NodePtr = typenameNodeTrait::NodePtr
 
using ParentPtr = typenameNodeTrait::ParentPtr
 
using ParentType = std::remove_pointer_t<ParentPtr >
 
using UpdateType =cfg::Update<NodePtr >
 
using UpdateKind =cfg::UpdateKind
 
using root_iterator = typenameSmallVectorImpl< NodeT * >::iterator
 Iteration over roots.
 
using const_root_iterator = typenameSmallVectorImpl< NodeT * >::const_iterator
 

Public Member Functions

 DominatorTreeBase ()=default
 
 DominatorTreeBase (DominatorTreeBase &&Arg)
 
DominatorTreeBaseoperator= (DominatorTreeBase &&RHS)
 
 DominatorTreeBase (constDominatorTreeBase &)=delete
 
DominatorTreeBaseoperator= (constDominatorTreeBase &)=delete
 
root_iterator root_begin ()
 
const_root_iterator root_begin ()const
 
root_iterator root_end ()
 
const_root_iterator root_end ()const
 
size_t root_size ()const
 
iterator_range<root_iteratorroots ()
 
iterator_range<const_root_iteratorroots ()const
 
bool isPostDominator ()const
 isPostDominator - Returns true if analysis based of postdoms
 
bool compare (constDominatorTreeBase &Other)const
 compare - Return false if the other dominator tree base matches this dominator tree base.
 
DomTreeNodeBase< NodeT > * getNode (const NodeT *BB)const
 getNode - return the (Post)DominatorTree node for the specified basic block.
 
DomTreeNodeBase< NodeT > * operator[] (const NodeT *BB)const
 See getNode.
 
DomTreeNodeBase< NodeT > * getRootNode ()
 getRootNode - This returns the entry node for the CFG of the function.
 
constDomTreeNodeBase< NodeT > * getRootNode ()const
 
void getDescendants (NodeT *R,SmallVectorImpl< NodeT * > &Result)const
 Get all nodes dominated by R, including R itself.
 
bool properlyDominates (constDomTreeNodeBase< NodeT > *A,constDomTreeNodeBase< NodeT > *B)const
 properlyDominates - Returns true iff A dominates B and A != B.
 
bool properlyDominates (const NodeT *A,const NodeT *B)const
 
bool isReachableFromEntry (const NodeT *A)const
 isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it.
 
bool isReachableFromEntry (constDomTreeNodeBase< NodeT > *A)const
 
bool dominates (constDomTreeNodeBase< NodeT > *A,constDomTreeNodeBase< NodeT > *B)const
 dominates - Returns true iff A dominates B.
 
bool dominates (const NodeT *A,const NodeT *B)const
 
NodeT * getRoot ()const
 
NodeT * findNearestCommonDominator (NodeT *A, NodeT *B)const
 Find nearest common dominator basic block for basic block A and B.
 
const NodeT * findNearestCommonDominator (const NodeT *A,const NodeT *B)const
 
bool isVirtualRoot (constDomTreeNodeBase< NodeT > *A)const
 
template<typename IteratorTy >
NodeT * findNearestCommonDominator (iterator_range< IteratorTy > Nodes)const
 
void applyUpdates (ArrayRef<UpdateType > Updates)
 Inform the dominator tree about a sequence of CFG edge insertions and deletions and perform a batch update on the tree.
 
void applyUpdates (ArrayRef<UpdateType > Updates,ArrayRef<UpdateType > PostViewUpdates)
 
void insertEdge (NodeT *From, NodeT *To)
 Inform the dominator tree about a CFG edge insertion and update the tree.
 
void deleteEdge (NodeT *From, NodeT *To)
 Inform the dominator tree about a CFG edge deletion and update the tree.
 
DomTreeNodeBase< NodeT > * addNewBlock (NodeT *BB, NodeT *DomBB)
 Add a new node to the dominator tree information.
 
DomTreeNodeBase< NodeT > * setNewRoot (NodeT *BB)
 Add a new node to the forward dominator tree and make it a new root.
 
void changeImmediateDominator (DomTreeNodeBase< NodeT > *N,DomTreeNodeBase< NodeT > *NewIDom)
 changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.
 
void changeImmediateDominator (NodeT *BB, NodeT *NewBB)
 
void eraseNode (NodeT *BB)
 eraseNode - Removes a node from the dominator tree.
 
void splitBlock (NodeT *NewBB)
 splitBlock - BB is split and now it has one successor.
 
void print (raw_ostream &O)const
 print - Convert to human readable form
 
void updateDFSNumbers ()const
 updateDFSNumbers - Assign In and Out numbers to the nodes while walking dominator tree in dfs order.
 
void recalculate (ParentType &Func)
 recalculate - compute a dominator tree for the given function
 
void recalculate (ParentType &Func,ArrayRef<UpdateType > Updates)
 
template<typenameT = NodeT>
std::enable_if_t<GraphHasNodeNumbers<T * >, void > updateBlockNumbers ()
 Update dominator tree after renumbering blocks.
 
bool verify (VerificationLevel VL=VerificationLevel::Full)const
 verify - checks if the tree is correct.
 
void reset ()
 

Static Public Attributes

static constexprbool IsPostDominator = IsPostDom
 
static constexprUpdateKind Insert = UpdateKind::Insert
 
static constexprUpdateKind Delete = UpdateKind::Delete
 

Protected Types

using DomTreeNodeStorageTy =SmallVector< std::unique_ptr<DomTreeNodeBase< NodeT > > >
 

Protected Member Functions

void addRoot (NodeT *BB)
 
DomTreeNodeBase< NodeT > * createNode (NodeT *BB,DomTreeNodeBase< NodeT > *IDom=nullptr)
 
template<classN >
void Split (typenameGraphTraits<N >::NodeRef NewBB)
 
void addRoot (MachineBasicBlock *MBB)
 

Protected Attributes

SmallVector< NodeT *, IsPostDom ? 4 :1 > Roots
 
DomTreeNodeStorageTy DomTreeNodes
 
std::conditional_t<!GraphHasNodeNumbers< NodeT * >,DenseMap<const NodeT *,unsigned >, std::tuple<> > NodeNumberMap
 
DomTreeNodeBase< NodeT > * RootNode = nullptr
 
ParentPtr Parent = nullptr
 
bool DFSInfoValid = false
 
unsigned int SlowQueries = 0
 
unsigned BlockNumberEpoch = 0
 

Friends

struct DomTreeBuilder::SemiNCAInfo< DominatorTreeBase >
 

Detailed Description

template<typename NodeT,bool IsPostDom>
class llvm::DominatorTreeBase< NodeT, IsPostDom >

Core dominator tree base class.

This class is a generic template over graph nodes. It is instantiated for various graphs in the LLVM IR or in the code generator.

Definition at line237 of fileGenericDomTree.h.

Member Typedef Documentation

◆ const_root_iterator

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::const_root_iterator = typenameSmallVectorImpl<NodeT *>::const_iterator

Definition at line313 of fileGenericDomTree.h.

◆ DomTreeNodeStorageTy

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodeStorageTy =SmallVector<std::unique_ptr<DomTreeNodeBase<NodeT> >>
protected

Definition at line261 of fileGenericDomTree.h.

◆ NodePtr

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::NodePtr = typenameNodeTrait::NodePtr

Definition at line243 of fileGenericDomTree.h.

◆ NodeTrait

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::NodeTrait =DomTreeNodeTraits<NodeT>

Definition at line241 of fileGenericDomTree.h.

◆ NodeType

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::NodeType = typenameNodeTrait::NodeType

Definition at line242 of fileGenericDomTree.h.

◆ ParentPtr

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::ParentPtr = typenameNodeTrait::ParentPtr

Definition at line244 of fileGenericDomTree.h.

◆ ParentType

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::ParentType = std::remove_pointer_t<ParentPtr>

Definition at line247 of fileGenericDomTree.h.

◆ root_iterator

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::root_iterator = typenameSmallVectorImpl<NodeT *>::iterator

Iteration over roots.

This may include multiple blocks if we are computing post dominators. For forward dominators, this will always be a single block (the entry block).

Definition at line312 of fileGenericDomTree.h.

◆ UpdateKind

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::UpdateKind =cfg::UpdateKind

Definition at line251 of fileGenericDomTree.h.

◆ UpdateType

template<typename NodeT ,bool IsPostDom>
usingllvm::DominatorTreeBase< NodeT, IsPostDom >::UpdateType =cfg::Update<NodePtr>

Definition at line250 of fileGenericDomTree.h.

Member Enumeration Documentation

◆ VerificationLevel

template<typename NodeT ,bool IsPostDom>
enum classllvm::DominatorTreeBase::VerificationLevel
strong
Enumerator
Fast 
Basic 
Full 

Definition at line255 of fileGenericDomTree.h.

Constructor & Destructor Documentation

◆ DominatorTreeBase()[1/3]

template<typename NodeT ,bool IsPostDom>
llvm::DominatorTreeBase< NodeT, IsPostDom >::DominatorTreeBase()
default

◆ DominatorTreeBase()[2/3]

template<typename NodeT ,bool IsPostDom>
llvm::DominatorTreeBase< NodeT, IsPostDom >::DominatorTreeBase(DominatorTreeBase< NodeT, IsPostDom > && Arg)
inline

Definition at line281 of fileGenericDomTree.h.

◆ DominatorTreeBase()[3/3]

template<typename NodeT ,bool IsPostDom>
llvm::DominatorTreeBase< NodeT, IsPostDom >::DominatorTreeBase(constDominatorTreeBase< NodeT, IsPostDom > & )
delete

Member Function Documentation

◆ addNewBlock()

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(NodeT * BB,
NodeT * DomBB 
)
inline

Add a new node to the dominator tree information.

This creates a new node as a child of DomBB dominator node, linking it into the children list of the immediate dominator.

Parameters
BBNew node in CFG.
DomBBCFG node that is dominator for BB.
Returns
New dominator tree node that represents new CFG node.

Definition at line687 of fileGenericDomTree.h.

Referencesassert(),llvm::DominatorTreeBase< NodeT, IsPostDom >::createNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid, andllvm::DominatorTreeBase< NodeT, IsPostDom >::getNode().

Referenced bycloneLoopBlocks(),CloneLoopBlocks(),llvm::cloneLoopWithPreheader(),loadMBUFScalarOperandsFromVGPR(),llvm::DominatorTreeBase< NodeT, IsPostDom >::Split(),SplitBlockImpl(),llvm::UnrollAndJamLoop(), andllvm::UnrollLoop().

◆ addRoot()[1/2]

voidllvm::DominatorTreeBase<MachineBasicBlock, false >::addRoot(MachineBasicBlockMBB)
inlineprotected

Definition at line36 of fileMachineDominators.h.

ReferencesMBB.

◆ addRoot()[2/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::addRoot(NodeT * BB)
inlineprotected

Definition at line921 of fileGenericDomTree.h.

Referencesllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot().

◆ applyUpdates()[1/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::applyUpdates(ArrayRef<UpdateTypeUpdates)
inline

Inform the dominator tree about a sequence of CFG edge insertions and deletions and perform a batch update on the tree.

This function should be used when there were multiple CFG updates after the last dominator tree update. It takes care of performing the updates in sync with the CFG and optimizes away the redundant operations that cancel each other. The functions expects the sequence of updates to be balanced. Eg.:

  • {{Insert, A, B}, {Delete, A, B}, {Insert, A, B}} is fine, because logically it results in a single insertions.
  • {{Insert, A, B}, {Insert, A, B}} is invalid, because it doesn't make sense to insert the same edge twice.

What's more, the functions assumes that it's safe to ask every node in the CFG about its children and inverse children. This implies that deletions of CFG edges must not delete the CFG nodes before calling this function.

The applyUpdates function can reorder the updates and remove redundant ones internally (as long as it is done in a deterministic fashion). The batch updater is also able to detect sequences of zero and exactly one update – it's optimized to do less work in these cases.

Note that for postdominators it automatically takes care of applying updates on reverse edges internally (so there's no need to swap the From and To pointers when constructingDominatorTree::UpdateType). The type of updates is the same for DomTreeBase<T> and PostDomTreeBase<T> with the same template parameter T.

Parameters
UpdatesAn ordered sequence of updates to perform. The current CFG and the reverse of these updates provides the pre-view of the CFG.

Definition at line612 of fileGenericDomTree.h.

Referencesllvm::DomTreeBuilder::ApplyUpdates().

Referenced byllvm::MemorySSAUpdater::applyUpdates(),llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdates(),llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdatesPermissive(),injectPendingInvariantConditions(),splitBlock(),llvm::SplitKnownCriticalEdge(),unswitchNontrivialInvariants(), andunswitchTrivialSwitch().

◆ applyUpdates()[2/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::applyUpdates(ArrayRef<UpdateTypeUpdates,
ArrayRef<UpdateTypePostViewUpdates 
)
inline
Parameters
UpdatesAn ordered sequence of updates to perform. The current CFG and the reverse of these updates provides the pre-view of the CFG.
PostViewUpdatesAn ordered sequence of update to perform in order to obtain a post-view of the CFG. The DT will be updated assuming the obtained PostViewCFG is the desired end state.

Definition at line623 of fileGenericDomTree.h.

Referencesllvm::append_range(),llvm::DomTreeBuilder::ApplyUpdates(), andllvm::ArrayRef< T >::empty().

◆ changeImmediateDominator()[1/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(DomTreeNodeBase< NodeT > * N,
DomTreeNodeBase< NodeT > * NewIDom 
)
inline

changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.

Definition at line723 of fileGenericDomTree.h.

Referencesassert(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid, andN.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(),cloneLoopBlocks(),llvm::cloneLoopWithPreheader(),ConnectEpilog(),ConnectProlog(),llvm::EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(),loadMBUFScalarOperandsFromVGPR(),llvm::peelLoop(),simplifyOneLoop(),llvm::DominatorTreeBase< NodeT, IsPostDom >::Split(),SplitBlockImpl(),llvm::splitLoopBound(),llvm::UnrollLoop(),llvm::UnrollRuntimeLoopRemainder(), andllvm::LoopVersioning::versionLoop().

◆ changeImmediateDominator()[2/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(NodeT * BB,
NodeT * NewBB 
)
inline

Definition at line730 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::getNode().

◆ compare()

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::compare(constDominatorTreeBase< NodeT, IsPostDom > & Other) const
inline

compare - Return false if the other dominator tree base matches this dominator tree base.

Otherwise return true.

Definition at line335 of fileGenericDomTree.h.

Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes,llvm::SmallVectorTemplateCommon< T, typename >::end(),llvm::Other,llvm::DominatorTreeBase< NodeT, IsPostDom >::Parent,llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andllvm::SmallVectorBase< Size_T >::size().

◆ createNode()

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::createNode(NodeT * BB,
DomTreeNodeBase< NodeT > * IDom =nullptr 
)
inlineprotected

Definition at line923 of fileGenericDomTree.h.

Referencesllvm::DomTreeNodeBase< NodeT >::addChild(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot().

◆ deleteEdge()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::deleteEdge(NodeT * From,
NodeT * To 
)
inline

Inform the dominator tree about a CFG edge deletion and update the tree.

This function has to be called just after making the update on the actual CFG. An internal functions checks if the edge doesn't exist in the CFG in DEBUG mode. There cannot be any other updates that the dominator tree doesn't know about.

Note that for postdominators it automatically takes care of deleting a reverse edge internally (so there's no need to swap the parameters).

Definition at line670 of fileGenericDomTree.h.

Referencesassert(),llvm::DomTreeBuilder::DeleteEdge(),From,llvm::DomTreeNodeTraits< NodeT >::getParent(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Parent.

Referenced byDoFlattenLoopPair(),replaceArgumentUses(), andunswitchTrivialBranch().

◆ dominates()[1/2]

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(constDomTreeNodeBase< NodeT > * A,
constDomTreeNodeBase< NodeT > * B 
) const
inline

dominates - Returns true iff A dominates B.

Note that this is not a constant time operation!

Definition at line467 of fileGenericDomTree.h.

ReferencesA,assert(),B,llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid,llvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(),llvm::DominatorTreeBase< NodeT, IsPostDom >::SlowQueries, andllvm::DominatorTreeBase< NodeT, IsPostDom >::updateDFSNumbers().

Referenced byllvm::LoopInfoBase< BlockT, LoopT >::analyze(),llvm::PostDominatorTree::dominates(),llvm::PartialOrderingVisitor::GetNodeRank(),llvm::DominatorTreeBase< NodeT, IsPostDom >::properlyDominates(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Split().

◆ dominates()[2/2]

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(const NodeT * A,
const NodeT * B 
) const

Definition at line1028 of fileGenericDomTree.h.

ReferencesA,B,dominates(), andgetNode().

◆ eraseNode()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::eraseNode(NodeT * BB)
inline

eraseNode - Removes a node from the dominator tree.

Block must not dominate any other blocks. Removes node from its immediate dominator's children list. Deletes dominator node associated with basic block BB.

Definition at line737 of fileGenericDomTree.h.

Referencesassert(),llvm::SmallVectorTemplateCommon< T, typename >::back(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid,llvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes,llvm::SmallVectorTemplateCommon< T, typename >::end(),llvm::find(),I,llvm::DominatorTreeBase< NodeT, IsPostDom >::NodeNumberMap,llvm::SmallVectorTemplateBase< T, bool >::pop_back(),llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andstd::swap().

Referenced byllvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::eraseDelBBNode(),llvm::MergeBlockIntoPredecessor(), andsimplifyOneLoop().

◆ findNearestCommonDominator()[1/3]

template<typename NodeT ,bool IsPostDom>
const NodeT *llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(const NodeT * A,
const NodeT * B 
) const
inline

Definition at line549 of fileGenericDomTree.h.

ReferencesA,B, andllvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator().

◆ findNearestCommonDominator()[2/3]

template<typename NodeT ,bool IsPostDom>
template<typename IteratorTy >
NodeT *llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(iterator_range< IteratorTy > Nodes) const
inline

Definition at line562 of fileGenericDomTree.h.

Referencesassert(),llvm::iterator_range< IteratorT >::begin(),llvm::drop_begin(),llvm::iterator_range< IteratorT >::empty(),llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::isVirtualRoot().

◆ findNearestCommonDominator()[3/3]

template<typename NodeT ,bool IsPostDom>
NodeT *llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(NodeT * A,
NodeT * B 
) const
inline

Find nearest common dominator basic block for basic block A and B.

A and B must have tree nodes.

Definition at line519 of fileGenericDomTree.h.

ReferencesA,assert(),B,llvm::DomTreeNodeBase< NodeT >::getBlock(),llvm::DomTreeNodeTraits< NodeT >::getEntryNode(),llvm::DomTreeNodeBase< NodeT >::getLevel(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),llvm::DomTreeNodeTraits< NodeT >::getParent(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isPostDominator(), andstd::swap().

Referenced byllvm::MachinePostDominatorTree::findNearestCommonDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(),hoistAndMergeSGPRInits(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Split().

◆ getDescendants()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::getDescendants(NodeT * R,
SmallVectorImpl< NodeT * > & Result 
) const
inline

Get all nodes dominated by R, including R itself.

Definition at line425 of fileGenericDomTree.h.

Referencesllvm::SmallVectorImpl< T >::append(),llvm::SmallVectorBase< Size_T >::empty(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),N,llvm::SmallVectorImpl< T >::pop_back_val(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced byllvm::SampleProfileLoaderBaseImpl< FT >::findEquivalenceClasses(), andreplaceArgumentUses().

◆ getNode()

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(const NodeT * BB) const
inline

getNode - return the (Post)DominatorTree node for the specified basic block.

This is the same as using operator[] on this class. The result may (but is not required to) be null for a forward (backwards) statically unreachable block.

Definition at line401 of fileGenericDomTree.h.

Referencesassert(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes,llvm::DomTreeNodeTraits< NodeT >::getParent(),Idx,llvm::DominatorTreeBase< NodeT, IsPostDom >::Parent, andllvm::SmallVectorBase< Size_T >::size().

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(),llvm::LoopInfoBase< BlockT, LoopT >::analyze(),llvm::IDFCalculatorBase< NodeTy, IsPostDom >::calculate(),llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(),checkAndReplaceCondition(),checkHoistValue(),cloneLoopBlocks(),CloneLoopBlocks(),llvm::cloneLoopWithPreheader(),llvm::collectChildrenInLoop(),collectUnswitchCandidatesWithInjections(),compareCmp(),llvm::ValueDFS_Compare::comparePHIRelated(),computeBlocksDominatingExits(),llvm::RegionBase< Tr >::contains(),containsUnconditionalCallSafepoint(),domTreeLevelBefore(),eliminateConstraints(),llvm::InnerLoopVectorizer::emitIterationCountCheck(),llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(),llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::eraseDelBBNode(),llvm::MustBeExecutedContextExplorer::findBackwardJoinPoint(),findBestInsertionSet(),llvm::MustBeExecutedContextExplorer::findForwardJoinPoint(),llvm::MachinePostDominatorTree::findNearestCommonDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(),formLCSSAForInstructionsImpl(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getDescendants(),getDominatees(),getDominators(),llvm::RegionBase< Tr >::getEnteringBlock(),llvm::rdf::Liveness::getNearestAliasedRef(),llvm::slpvectorizer::BoUpSLP::getReorderingData(),llvm::slpvectorizer::BoUpSLP::getSpillCost(),llvm::hoistRegion(),hoistValue(),isGuaranteedNotToBeUndefOrPoison(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(),loadCSE(),llvm::PhiLoweringHelper::lowerPhis(),llvm::MergeBlockIntoPredecessor(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator[](),llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(),llvm::peelLoop(),preheader(),llvm::MemorySSA::renamePass(),llvm::GuardWideningPass::run(),llvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot(),shouldSplitOnPredicatedArgument(),simplifyOneLoop(),simplifyUsingControlFlow(),SinkInstruction(),llvm::sinkRegionForLoopNest(),llvm::DominatorTreeBase< NodeT, IsPostDom >::Split(),SplitBlockImpl(),llvm::UnrollAndJamLoop(),llvm::UnrollLoop(),llvm::UnrollRuntimeLoopRemainder(),llvm::GenericConvergenceVerifier< ContextT >::verify(), andllvm::MemorySSA::verifyPrevDefInPhis().

◆ getRoot()

template<typename NodeT ,bool IsPostDom>
NodeT *llvm::DominatorTreeBase< NodeT, IsPostDom >::getRoot() const
inline

Definition at line512 of fileGenericDomTree.h.

Referencesassert(), andllvm::SmallVectorBase< Size_T >::size().

Referenced byllvm::ForwardDominanceFrontierBase< BlockT >::analyze(),getFreezeInsertPt(),llvm::EarliestEscapeAnalysis::isNotCapturedBefore(), andnearest_common_dominatee().

◆ getRootNode()[1/2]

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::getRootNode()
inline

getRootNode - This returns the entry node for the CFG of the function.

If this tree represents the post-dominance relations for a function, however, this root may be a node with the block == NULL. This is the case when there are multiple exit nodes from a particular function. Consumers of post-dominance information must be capable of dealing with this possibility.

Definition at line421 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::RootNode.

Referenced byllvm::LoopInfoBase< BlockT, LoopT >::analyze(),llvm::PredicateInfoBuilder::buildPredicateInfo(),llvm::GraphTraits< DominatorTree * >::getEntryNode(),llvm::GraphTraits< MachineDominatorTree * >::getEntryNode(),llvm::GraphTraits< PostDominatorTree * >::getEntryNode(),llvm::MemorySSA::OptimizeUses::optimizeUses(),llvm::DominatorTreeBase< NodeT, IsPostDom >::print(),llvm::GuardWideningPass::run(),UpdateAnalysisInformation(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::updateDFSNumbers().

◆ getRootNode()[2/2]

template<typename NodeT ,bool IsPostDom>
constDomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::getRootNode() const
inline

Definition at line422 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::RootNode.

◆ insertEdge()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::insertEdge(NodeT * From,
NodeT * To 
)
inline

Inform the dominator tree about a CFG edge insertion and update the tree.

This function has to be called just before or just after making the update on the actual CFG. There cannot be any other updates that the dominator tree doesn't know about.

Note that for postdominators it automatically takes care of inserting a reverse edge internally (so there's no need to swap the parameters).

Definition at line652 of fileGenericDomTree.h.

Referencesassert(),From,llvm::DomTreeNodeTraits< NodeT >::getParent(),llvm::DomTreeBuilder::InsertEdge(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Parent.

Referenced byreplaceArgumentUses(), andunswitchTrivialBranch().

◆ isPostDominator()

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::isPostDominator() const
inline

isPostDominator - Returns true if analysis based of postdoms

Definition at line331 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::IsPostDominator.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isVirtualRoot(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot().

◆ isReachableFromEntry()[1/2]

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(constDomTreeNodeBase< NodeT > * A) const
inline

Definition at line462 of fileGenericDomTree.h.

ReferencesA.

◆ isReachableFromEntry()[2/2]

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(const NodeT * A) const
inline

isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it.

Definition at line456 of fileGenericDomTree.h.

Referencesassert(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isPostDominator(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry().

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(),llvm::DominatorTreeBase< NodeT, IsPostDom >::Split(), andllvm::LoopBase< BasicBlock, Loop >::verifyLoopNest().

◆ isVirtualRoot()

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::isVirtualRoot(constDomTreeNodeBase< NodeT > * A) const
inline

Definition at line557 of fileGenericDomTree.h.

ReferencesA, andllvm::DominatorTreeBase< NodeT, IsPostDom >::isPostDominator().

Referenced byllvm::MachinePostDominatorTree::findNearestCommonDominator(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator().

◆ operator=()[1/2]

template<typename NodeT ,bool IsPostDom>
DominatorTreeBase &llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(constDominatorTreeBase< NodeT, IsPostDom > & )
delete

◆ operator=()[2/2]

template<typename NodeT ,bool IsPostDom>
DominatorTreeBase &llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(DominatorTreeBase< NodeT, IsPostDom > && RHS)
inline

Definition at line289 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::BlockNumberEpoch,llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid,llvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes,llvm::DominatorTreeBase< NodeT, IsPostDom >::NodeNumberMap,llvm::DominatorTreeBase< NodeT, IsPostDom >::Parent,RHS,llvm::DominatorTreeBase< NodeT, IsPostDom >::RootNode,llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andllvm::DominatorTreeBase< NodeT, IsPostDom >::SlowQueries.

◆ operator[]()

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::operator[](const NodeT * BB) const
inline

See getNode.

Definition at line410 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::getNode().

◆ print()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::print(raw_ostreamO) const
inline

print - Convert to human readable form

Definition at line782 of fileGenericDomTree.h.

Referencesllvm::Block,llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid,llvm::DominatorTreeBase< NodeT, IsPostDom >::getRootNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::IsPostDominator,llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andllvm::DominatorTreeBase< NodeT, IsPostDom >::SlowQueries.

Referenced byllvm::VPlanHCFGBuilder::buildHierarchicalCFG(),llvm::PostDominatorTreeWrapperPass::print(), andllvm::DominatorTreeWrapperPass::print().

◆ properlyDominates()[1/2]

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::properlyDominates(constDomTreeNodeBase< NodeT > * A,
constDomTreeNodeBase< NodeT > * B 
) const
inline

properlyDominates - Returns true iff A dominates B and A != B.

Note that this is not a constant time operation!

Definition at line443 of fileGenericDomTree.h.

ReferencesA,B, andllvm::DominatorTreeBase< NodeT, IsPostDom >::dominates().

Referenced byllvm::RegionBase< RegionTraits< MachineFunction > >::clearNodeCache(),ConstructSSAForLoadSet(),llvm::InnerLoopVectorizer::emitIterationCountCheck(),llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(),llvm::rdf::Liveness::getAllReachingDefs(),llvm::getIntDivCycle(),hoistAndMergeSGPRInits(),llvm::ScalarEvolution::isKnownViaInduction(),isLoadInvariantInLoop(), andloadMBUFScalarOperandsFromVGPR().

◆ properlyDominates()[2/2]

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::properlyDominates(const NodeT * A,
const NodeT * B 
) const

Definition at line1036 of fileGenericDomTree.h.

ReferencesA,B,dominates(), andgetNode().

◆ recalculate()[1/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::recalculate(ParentTypeFunc)
inline

recalculate - compute a dominator tree for the given function

Definition at line859 of fileGenericDomTree.h.

Referencesllvm::DomTreeBuilder::Calculate(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Parent.

Referenced byAddAliasScopeMetadata(),AddAlignmentAssumptions(),llvm::VPlanTransforms::adjustFixedOrderRecurrences(),llvm::VPlanHCFGBuilder::buildHierarchicalCFG(),llvm::SampleProfileLoaderBaseImpl< FT >::computeDominanceAndLoopInfo(),llvm::VPlanTransforms::createInterleaveGroups(),INITIALIZE_PASS(),llvm::OptimizationRemarkEmitter::OptimizationRemarkEmitter(),llvm::PartialOrderingVisitor::PartialOrderingVisitor(),llvm::PostDominatorTree::PostDominatorTree(),llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::recalculate(),llvm::LoopConstrainer::run(),llvm::DominatorTreeAnalysis::run(),llvm::PlaceSafepointsPass::runImpl(),llvm::PostDominatorTreeWrapperPass::runOnFunction(),verifyConvergenceControl(), andllvm::verifyVPlanIsValid().

◆ recalculate()[2/2]

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::recalculate(ParentTypeFunc,
ArrayRef<UpdateTypeUpdates 
)
inline

Definition at line865 of fileGenericDomTree.h.

Referencesllvm::DomTreeBuilder::CalculateWithUpdates(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Parent.

◆ reset()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::reset()
inline

Definition at line909 of fileGenericDomTree.h.

Referencesllvm::SmallVectorImpl< T >::clear(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid,llvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes,llvm::DominatorTreeBase< NodeT, IsPostDom >::NodeNumberMap,llvm::DominatorTreeBase< NodeT, IsPostDom >::Parent,llvm::DominatorTreeBase< NodeT, IsPostDom >::RootNode,llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andllvm::DominatorTreeBase< NodeT, IsPostDom >::SlowQueries.

Referenced byllvm::SampleProfileLoaderBaseImpl< FT >::computeDominanceAndLoopInfo(), andllvm::PostDominatorTreeWrapperPass::releaseMemory().

◆ root_begin()[1/2]

template<typename NodeT ,bool IsPostDom>
root_iteratorllvm::DominatorTreeBase< NodeT, IsPostDom >::root_begin()
inline

Definition at line315 of fileGenericDomTree.h.

Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Roots.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::roots().

◆ root_begin()[2/2]

template<typename NodeT ,bool IsPostDom>
const_root_iteratorllvm::DominatorTreeBase< NodeT, IsPostDom >::root_begin() const
inline

Definition at line316 of fileGenericDomTree.h.

Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Roots.

◆ root_end()[1/2]

template<typename NodeT ,bool IsPostDom>
root_iteratorllvm::DominatorTreeBase< NodeT, IsPostDom >::root_end()
inline

Definition at line317 of fileGenericDomTree.h.

Referencesllvm::SmallVectorTemplateCommon< T, typename >::end(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Roots.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::roots().

◆ root_end()[2/2]

template<typename NodeT ,bool IsPostDom>
const_root_iteratorllvm::DominatorTreeBase< NodeT, IsPostDom >::root_end() const
inline

Definition at line318 of fileGenericDomTree.h.

Referencesllvm::SmallVectorTemplateCommon< T, typename >::end(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::Roots.

◆ root_size()

template<typename NodeT ,bool IsPostDom>
size_tllvm::DominatorTreeBase< NodeT, IsPostDom >::root_size() const
inline

Definition at line320 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andllvm::SmallVectorBase< Size_T >::size().

◆ roots()[1/2]

template<typename NodeT ,bool IsPostDom>
iterator_range<root_iterator >llvm::DominatorTreeBase< NodeT, IsPostDom >::roots()
inline

Definition at line322 of fileGenericDomTree.h.

Referencesllvm::make_range(),llvm::DominatorTreeBase< NodeT, IsPostDom >::root_begin(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::root_end().

◆ roots()[2/2]

template<typename NodeT ,bool IsPostDom>
iterator_range<const_root_iterator >llvm::DominatorTreeBase< NodeT, IsPostDom >::roots() const
inline

Definition at line325 of fileGenericDomTree.h.

Referencesllvm::make_range(),llvm::DominatorTreeBase< NodeT, IsPostDom >::root_begin(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::root_end().

◆ setNewRoot()

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase< NodeT > *llvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot(NodeT * BB)
inline

Add a new node to the forward dominator tree and make it a new root.

Parameters
BBNew node in CFG.
Returns
New dominator tree node that represents new CFG node.

Definition at line700 of fileGenericDomTree.h.

Referencesllvm::DomTreeNodeBase< NodeT >::addChild(),llvm::DominatorTreeBase< NodeT, IsPostDom >::addRoot(),assert(),llvm::DominatorTreeBase< NodeT, IsPostDom >::createNode(),llvm::SmallVectorBase< Size_T >::empty(),llvm::SmallVectorTemplateCommon< T, typename >::front(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isPostDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::RootNode,llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots, andllvm::SmallVectorBase< Size_T >::size().

Referenced byUpdateAnalysisInformation().

◆ Split()

template<typename NodeT ,bool IsPostDom>
template<classN >
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::Split(typenameGraphTraits<N >::NodeRef NewBB)
inlineprotected

Definition at line937 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(),assert(),llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(),llvm::SmallVectorBase< Size_T >::empty(),llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),llvm::hasSingleElement(),llvm::DominatorTreeBase< NodeT, IsPostDom >::isReachableFromEntry(), andllvm::SmallVectorBase< Size_T >::size().

◆ splitBlock()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::splitBlock(NodeT * NewBB)
inline

splitBlock - BB is split and now it has one successor.

Update dominator tree to reflect this change.

Definition at line773 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::IsPostDominator.

Referenced byinsertUniqueBackedgeBlock(), andUpdateAnalysisInformation().

◆ updateBlockNumbers()

template<typename NodeT ,bool IsPostDom>
template<typenameT = NodeT>
std::enable_if_t<GraphHasNodeNumbers<T * >, void >llvm::DominatorTreeBase< NodeT, IsPostDom >::updateBlockNumbers()
inline

Update dominator tree after renumbering blocks.

Definition at line873 of fileGenericDomTree.h.

Referencesllvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes,Idx,llvm::DominatorTreeBase< NodeT, IsPostDom >::Parent,llvm::SmallVectorImpl< T >::resize(), andllvm::SmallVectorBase< Size_T >::size().

Referenced bysortBlocks().

◆ updateDFSNumbers()

template<typename NodeT ,bool IsPostDom>
voidllvm::DominatorTreeBase< NodeT, IsPostDom >::updateDFSNumbers() const
inline

updateDFSNumbers - Assign In and Out numbers to the nodes while walking dominator tree in dfs order.

Definition at line805 of fileGenericDomTree.h.

Referencesassert(),llvm::SmallVectorTemplateCommon< T, typename >::back(),llvm::DomTreeNodeBase< NodeT >::begin(),llvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid,llvm::SmallVectorBase< Size_T >::empty(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getRootNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::Parent,llvm::SmallVectorTemplateBase< T, bool >::pop_back(),llvm::SmallVectorTemplateBase< T, bool >::push_back(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::SlowQueries.

Referenced byllvm::PredicateInfoBuilder::buildPredicateInfo(),llvm::IDFCalculatorBase< NodeTy, IsPostDom >::calculate(),llvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(),eliminateConstraints(),llvm::isSafeToMoveBefore(),llvm::PhiLoweringHelper::lowerPhis(), andllvm::SLPVectorizerPass::runImpl().

◆ verify()

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::verify(VerificationLevel VL =VerificationLevel::Full) const
inline

verify - checks if the tree is correct.

There are 3 level of verification:

  • Full – verifies if the tree is correct by making sure all the properties (including the parent and the sibling property) hold. Takes O(N^3) time.
  • Basic – checks if the tree is correct, but compares it to a freshly constructed tree instead of checking the sibling property. Takes O(N^2) time.
  • Fast – checks basic tree structure and compares it with a freshly constructed tree. Takes O(N^2) time worst case, but is faster in practise (same as tree construction).

Definition at line905 of fileGenericDomTree.h.

Referencesllvm::DomTreeBuilder::Verify().

Referenced byllvm::LoopVectorizationPlanner::executePlan(),fixIrreducible(),llvm::hoistRegion(),injectPendingInvariantConditions(),llvm::peelLoop(),llvm::LoopVectorizePass::processLoop(),llvm::DominatorTreeVerifierPass::run(),llvm::CorrelatedValuePropagationPass::run(),llvm::FunctionToLoopPassAdaptor::run(),llvm::StackProtectorPass::run(),llvm::LoopBoundSplitPass::run(),llvm::SimpleLoopUnswitchPass::run(),runImpl(),simplifyFunctionCFG(),unifyLoopExits(),llvm::UnrollAndJamLoop(),llvm::UnrollLoop(),llvm::UnrollRuntimeLoopRemainder(),unswitchNontrivialInvariants(),unswitchTrivialSwitch(),llvm::PostDominatorTreeWrapperPass::verifyAnalysis(), andllvm::DominatorTreeWrapperPass::verifyAnalysis().

Friends And Related Function Documentation

◆ DomTreeBuilder::SemiNCAInfo< DominatorTreeBase >

template<typename NodeT ,bool IsPostDom>
friend structDomTreeBuilder::SemiNCAInfo<DominatorTreeBase >
friend

Definition at line274 of fileGenericDomTree.h.

Member Data Documentation

◆ BlockNumberEpoch

template<typename NodeT ,bool IsPostDom>
unsignedllvm::DominatorTreeBase< NodeT, IsPostDom >::BlockNumberEpoch = 0
protected

Definition at line274 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::operator=().

◆ Delete

template<typename NodeT ,bool IsPostDom>
constexprUpdateKindllvm::DominatorTreeBase< NodeT, IsPostDom >::Delete = UpdateKind::Delete
staticconstexpr

Definition at line253 of fileGenericDomTree.h.

Referenced byllvm::MemorySSAUpdater::applyUpdates(), andunswitchTrivialSwitch().

◆ DFSInfoValid

template<typename NodeT ,bool IsPostDom>
boolllvm::DominatorTreeBase< NodeT, IsPostDom >::DFSInfoValid = false
mutableprotected

Definition at line272 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::addNewBlock(),llvm::DominatorTreeBase< NodeT, IsPostDom >::changeImmediateDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(),llvm::DominatorTreeBase< NodeT, IsPostDom >::eraseNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(),llvm::DominatorTreeBase< NodeT, IsPostDom >::print(),llvm::DominatorTreeBase< NodeT, IsPostDom >::reset(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::updateDFSNumbers().

◆ DomTreeNodes

template<typename NodeT ,bool IsPostDom>
DomTreeNodeStorageTyllvm::DominatorTreeBase< NodeT, IsPostDom >::DomTreeNodes
protected

Definition at line263 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::compare(),llvm::DominatorTreeBase< NodeT, IsPostDom >::createNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::eraseNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(),llvm::DominatorTreeBase< NodeT, IsPostDom >::reset(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::updateBlockNumbers().

◆ Insert

template<typename NodeT ,bool IsPostDom>
constexprUpdateKindllvm::DominatorTreeBase< NodeT, IsPostDom >::Insert = UpdateKind::Insert
staticconstexpr

Definition at line252 of fileGenericDomTree.h.

Referenced byllvm::MemorySSAUpdater::applyUpdates(), andunswitchTrivialSwitch().

◆ IsPostDominator

template<typename NodeT ,bool IsPostDom>
constexprboolllvm::DominatorTreeBase< NodeT, IsPostDom >::IsPostDominator = IsPostDom
staticconstexpr

Definition at line248 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::isPostDominator(),llvm::DominatorTreeBase< NodeT, IsPostDom >::print(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::splitBlock().

◆ NodeNumberMap

template<typename NodeT ,bool IsPostDom>
std::conditional_t<!GraphHasNodeNumbers<NodeT *>,DenseMap<const NodeT *,unsigned>, std::tuple<> >llvm::DominatorTreeBase< NodeT, IsPostDom >::NodeNumberMap
protected

Definition at line268 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::eraseNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::reset().

◆ Parent

template<typename NodeT ,bool IsPostDom>
ParentPtrllvm::DominatorTreeBase< NodeT, IsPostDom >::Parent = nullptr
protected

Definition at line270 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::compare(),llvm::DominatorTreeBase< NodeT, IsPostDom >::deleteEdge(),llvm::DominatorTree::DominatorTree(),llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::insertEdge(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(),llvm::DominatorTreeBase< NodeT, IsPostDom >::recalculate(),llvm::DominatorTreeBase< NodeT, IsPostDom >::reset(),llvm::DominatorTreeBase< NodeT, IsPostDom >::updateBlockNumbers(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::updateDFSNumbers().

◆ RootNode

template<typename NodeT ,bool IsPostDom>
DomTreeNodeBase<NodeT>*llvm::DominatorTreeBase< NodeT, IsPostDom >::RootNode = nullptr
protected

Definition at line269 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::getRootNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(),llvm::DominatorTreeBase< NodeT, IsPostDom >::reset(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot().

◆ Roots

template<typename NodeT ,bool IsPostDom>
SmallVector<NodeT *, IsPostDom ? 4 : 1>llvm::DominatorTreeBase< NodeT, IsPostDom >::Roots
protected

Definition at line259 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::compare(),llvm::DominatorTreeBase< NodeT, IsPostDom >::eraseNode(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(),llvm::DominatorTreeBase< NodeT, IsPostDom >::print(),llvm::DominatorTreeBase< NodeT, IsPostDom >::reset(),llvm::DominatorTreeBase< NodeT, IsPostDom >::root_begin(),llvm::DominatorTreeBase< NodeT, IsPostDom >::root_end(),llvm::DominatorTreeBase< NodeT, IsPostDom >::root_size(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::setNewRoot().

◆ SlowQueries

template<typename NodeT ,bool IsPostDom>
unsigned intllvm::DominatorTreeBase< NodeT, IsPostDom >::SlowQueries = 0
mutableprotected

Definition at line273 of fileGenericDomTree.h.

Referenced byllvm::DominatorTreeBase< NodeT, IsPostDom >::dominates(),llvm::DominatorTreeBase< NodeT, IsPostDom >::operator=(),llvm::DominatorTreeBase< NodeT, IsPostDom >::print(),llvm::DominatorTreeBase< NodeT, IsPostDom >::reset(), andllvm::DominatorTreeBase< NodeT, IsPostDom >::updateDFSNumbers().


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

Generated on Sun Jul 20 2025 16:03:42 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp