LLVM 22.0.0git
llvm::MachinePostDominatorTree Class Reference

MachinePostDominatorTree - an analysis pass wrapper for DominatorTree used to compute the post-dominator tree for MachineFunctions. More...

#include "llvm/CodeGen/MachinePostDominators.h"

Inheritance diagram for llvm::MachinePostDominatorTree:
[legend]

Public Member Functions

 MachinePostDominatorTree ()=default
 MachinePostDominatorTree (MachineFunction &MF)
LLVM_ABI bool invalidate (MachineFunction &, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &)
 Handle invalidation explicitly.
LLVM_ABI MachineBasicBlockfindNearestCommonDominator (ArrayRef< MachineBasicBlock * > Blocks) const
 Returns the nearest common dominator of the given blocks.
TfindNearestCommonDominator (T *A, T *B) const
 Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available.
const TfindNearestCommonDominator (const T *A, const T *B) const
 Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available.
TfindNearestCommonDominator (iterator_range< IteratorTy > Nodes) const
 Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available.
Public Member Functions inherited from llvm::DominatorTreeBase< T, true >
 DominatorTreeBase ()=default
 DominatorTreeBase (DominatorTreeBase &&Arg)
DominatorTreeBaseoperator= (DominatorTreeBase &&RHS)
 DominatorTreeBase (const DominatorTreeBase &)=delete
DominatorTreeBaseoperator= (const DominatorTreeBase &)=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 (const DominatorTreeBase &Other) const
 compare - Return false if the other dominator tree base matches this dominator tree base.
DomTreeNodeBase< T > * getNode (const T *BB) const
 getNode - return the (Post)DominatorTree node for the specified basic block.
DomTreeNodeBase< T > * operator[] (const T *BB) const
 See getNode.
DomTreeNodeBase< T > * getRootNode ()
 getRootNode - This returns the entry node for the CFG of the function.
const DomTreeNodeBase< T > * getRootNode () const
void getDescendants (T *R, SmallVectorImpl< T * > &Result) const
 Get all nodes dominated by R, including R itself.
bool properlyDominates (const DomTreeNodeBase< T > *A, const DomTreeNodeBase< T > *B) const
 properlyDominates - Returns true iff A dominates B and A != B.
bool properlyDominates (const T *A, const T *B) const
bool isReachableFromEntry (const T *A) const
 isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it.
bool isReachableFromEntry (const DomTreeNodeBase< T > *A) const
bool dominates (const DomTreeNodeBase< T > *A, const DomTreeNodeBase< T > *B) const
 dominates - Returns true iff A dominates B.
bool dominates (const T *A, const T *B) const
TgetRoot () const
TfindNearestCommonDominator (T *A, T *B) const
 Find nearest common dominator basic block for basic block A and B.
const TfindNearestCommonDominator (const T *A, const T *B) const
bool isVirtualRoot (const DomTreeNodeBase< T > *A) const
TfindNearestCommonDominator (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 (T *From, T *To)
 Inform the dominator tree about a CFG edge insertion and update the tree.
void deleteEdge (T *From, T *To)
 Inform the dominator tree about a CFG edge deletion and update the tree.
DomTreeNodeBase< T > * addNewBlock (T *BB, T *DomBB)
 Add a new node to the dominator tree information.
DomTreeNodeBase< T > * setNewRoot (T *BB)
 Add a new node to the forward dominator tree and make it a new root.
void changeImmediateDominator (DomTreeNodeBase< T > *N, DomTreeNodeBase< T > *NewIDom)
 changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.
void changeImmediateDominator (T *BB, T *NewBB)
void eraseNode (T *BB)
 eraseNode - Removes a node from the dominator tree.
void splitBlock (T *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)
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 ()

Additional Inherited Members

Public Types inherited from llvm::DominatorTreeBase< T, true >
enum  VerificationLevel
using NodeTrait
using NodeType
using NodePtr
using ParentPtr
using ParentType
using UpdateType
using UpdateKind
using root_iterator
 Iteration over roots.
using const_root_iterator
Static Public Attributes inherited from llvm::DominatorTreeBase< T, true >
static constexpr bool IsPostDominator
static constexpr UpdateKind Insert
static constexpr UpdateKind Delete
Protected Types inherited from llvm::DominatorTreeBase< T, true >
using DomTreeNodeStorageTy
Protected Member Functions inherited from llvm::DominatorTreeBase< T, true >
void addRoot (T *BB)
DomTreeNodeBase< T > * createNode (T *BB, DomTreeNodeBase< T > *IDom=nullptr)
void Split (typename GraphTraits< N >::NodeRef NewBB)
Protected Attributes inherited from llvm::DominatorTreeBase< T, true >
SmallVector< T *, IsPostDom ? 4 :1 > Roots
DomTreeNodeStorageTy DomTreeNodes
std::conditional_t<!GraphHasNodeNumbers< T * >, DenseMap< const T *, unsigned >, std::tuple<> > NodeNumberMap
DomTreeNodeBase< T > * RootNode
ParentPtr Parent
bool DFSInfoValid
unsigned int SlowQueries
unsigned BlockNumberEpoch

Detailed Description

MachinePostDominatorTree - an analysis pass wrapper for DominatorTree used to compute the post-dominator tree for MachineFunctions.

Definition at line 49 of file MachinePostDominators.h.

Constructor & Destructor Documentation

◆ MachinePostDominatorTree() [1/2]

llvm::MachinePostDominatorTree::MachinePostDominatorTree ( )
default

◆ MachinePostDominatorTree() [2/2]

llvm::MachinePostDominatorTree::MachinePostDominatorTree ( MachineFunction & MF)
inlineexplicit

Member Function Documentation

◆ findNearestCommonDominator() [1/4]

MachineBasicBlock * MachinePostDominatorTree::findNearestCommonDominator ( ArrayRef< MachineBasicBlock * > Blocks) const

Returns the nearest common dominator of the given blocks.

If that tree node is a virtual root, a nullptr will be returned.

Definition at line 98 of file MachinePostDominators.cpp.

References assert(), llvm::ArrayRef< T >::consume_front(), llvm::ArrayRef< T >::empty(), llvm::DominatorTreeBase< T, true >::findNearestCommonDominator(), llvm::DominatorTreeBase< T, true >::getNode(), and llvm::DominatorTreeBase< T, true >::isVirtualRoot().

◆ findNearestCommonDominator() [2/4]

const T * llvm::DominatorTreeBase< T, IsPostDom >::findNearestCommonDominator ( const T * A,
const T * B ) const
inline

Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available.

Definition at line 549 of file GenericDomTree.h.

◆ findNearestCommonDominator() [3/4]

T * llvm::DominatorTreeBase< T, IsPostDom >::findNearestCommonDominator ( iterator_range< IteratorTy > Nodes) const
inline

Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available.

Definition at line 562 of file GenericDomTree.h.

◆ findNearestCommonDominator() [4/4]

T * llvm::DominatorTreeBase< T, IsPostDom >::findNearestCommonDominator ( T * A,
T * B ) const
inline

Make findNearestCommonDominator(const NodeT *A, const NodeT *B) available.

Definition at line 519 of file GenericDomTree.h.

◆ invalidate()

bool MachinePostDominatorTree::invalidate ( MachineFunction & ,
const PreservedAnalyses & PA,
MachineFunctionAnalysisManager::Invalidator &  )

Handle invalidation explicitly.

Definition at line 87 of file MachinePostDominators.cpp.

References llvm::PreservedAnalyses::getChecker().


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