LLVM 20.0.0git
Public Types | Public Member Functions | List of all members
llvm::MachineDomTreeUpdater Class Reference

#include "llvm/CodeGen/MachineDomTreeUpdater.h"

Inheritance diagram for llvm::MachineDomTreeUpdater:
Inheritance graph
[legend]

Public Types

using Base = GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >
 
- Public Types inherited from llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >
enum  UpdateStrategy
 
using BasicBlockT = typename DomTreeT::NodeType
 
using UpdateT = typename DomTreeT::UpdateType
 

Public Member Functions

 ~MachineDomTreeUpdater ()
 
Mutation APIs
void deleteBB (MachineBasicBlock *DelBB)
 Delete DelBB.
 
- Public Member Functions inherited from llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >
 GenericDomTreeUpdater (UpdateStrategy Strategy_)
 
 GenericDomTreeUpdater (MachineDominatorTree &DT_, UpdateStrategy Strategy_)
 
 GenericDomTreeUpdater (MachineDominatorTree *DT_, UpdateStrategy Strategy_)
 
 GenericDomTreeUpdater (MachinePostDominatorTree &PDT_, UpdateStrategy Strategy_)
 
 GenericDomTreeUpdater (MachinePostDominatorTree *PDT_, UpdateStrategy Strategy_)
 
 GenericDomTreeUpdater (MachineDominatorTree &DT_, MachinePostDominatorTree &PDT_, UpdateStrategy Strategy_)
 
 GenericDomTreeUpdater (MachineDominatorTree *DT_, MachinePostDominatorTree *PDT_, UpdateStrategy Strategy_)
 
 ~GenericDomTreeUpdater ()
 
bool isLazy () const
 Returns true if the current strategy is Lazy.
 
bool isEager () const
 Returns true if the current strategy is Eager.
 
bool hasDomTree () const
 Returns true if it holds a DomTreeT.
 
bool hasPostDomTree () const
 Returns true if it holds a PostDomTreeT.
 
bool hasPendingDeletedBB () const
 Returns true if there is BasicBlockT awaiting deletion.
 
bool isBBPendingDeletion (BasicBlockT *DelBB) const
 Returns true if DelBB is awaiting deletion.
 
bool hasPendingUpdates () const
 Returns true if either of DT or PDT is valid and the tree has at least one update pending.
 
bool hasPendingDomTreeUpdates () const
 Returns true if there are DomTreeT updates queued.
 
bool hasPendingPostDomTreeUpdates () const
 Returns true if there are PostDomTreeT updates queued.
 
LLVM_DUMP_METHOD void dump () const
 Debug method to help view the internal state of this class.
 
void recalculate (FuncT &F)
 Notify DTU that the entry block was replaced.
 
void applyUpdates (ArrayRef< UpdateT > Updates)
 Submit updates to all available trees.
 
void splitCriticalEdge (BasicBlockT *FromBB, BasicBlockT *ToBB, BasicBlockT *NewBB)
 Apply updates that the critical edge (FromBB, ToBB) has been split with NewBB.
 
void applyUpdatesPermissive (ArrayRef< UpdateT > Updates)
 Submit updates to all available trees.
 
MachineDominatorTreegetDomTree ()
 Flush DomTree updates and return DomTree.
 
MachinePostDominatorTreegetPostDomTree ()
 Flush PostDomTree updates and return PostDomTree.
 
void flush ()
 Apply all pending updates to available trees and flush all BasicBlocks awaiting deletion.
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >
bool isSelfDominance (UpdateT Update) const
 Returns true if the update is self dominance.
 
void applyDomTreeUpdates ()
 Helper function to apply all pending DomTree updates.
 
void applyPostDomTreeUpdates ()
 Helper function to apply all pending PostDomTree updates.
 
bool isUpdateValid (UpdateT Update) const
 Returns true if the update appears in the LLVM IR.
 
void eraseDelBBNode (BasicBlockT *DelBB)
 Erase Basic Block node before it is unlinked from Function in the DomTree and PostDomTree.
 
void tryFlushDeletedBB ()
 Helper function to flush deleted BasicBlocks if all available trees are up-to-date.
 
void dropOutOfDateUpdates ()
 Drop all updates applied by all available trees and delete BasicBlocks if all available trees are up-to-date.
 
- Protected Attributes inherited from llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >
SmallVector< DomTreeUpdate, 16 > PendUpdates
 
size_t PendDTUpdateIndex
 
size_t PendPDTUpdateIndex
 
MachineDominatorTreeDT
 
MachinePostDominatorTreePDT
 
const UpdateStrategy Strategy
 
SmallPtrSet< BasicBlockT *, 8 > DeletedBBs
 
bool IsRecalculatingDomTree
 
bool IsRecalculatingPostDomTree
 

Detailed Description

Definition at line 24 of file MachineDomTreeUpdater.h.

Member Typedef Documentation

◆ Base

Definition at line 31 of file MachineDomTreeUpdater.h.

Constructor & Destructor Documentation

◆ ~MachineDomTreeUpdater()

llvm::MachineDomTreeUpdater::~MachineDomTreeUpdater ( )
inline

Member Function Documentation

◆ deleteBB()

void llvm::MachineDomTreeUpdater::deleteBB ( MachineBasicBlock DelBB)

Delete DelBB.

DelBB will be removed from its Parent and erased from available trees if it exists and finally get deleted. Under Eager UpdateStrategy, DelBB will be processed immediately. Under Lazy UpdateStrategy, DelBB will be queued until a flush event and all available trees are up-to-date. Assert if any instruction of DelBB is modified while awaiting deletion. When both DT and PDT are nullptrs, DelBB will be queued until flush() is called.

Definition at line 52 of file MachineDomTreeUpdater.cpp.

References llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >::DeletedBBs, llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >::eraseDelBBNode(), llvm::MachineBasicBlock::eraseFromParent(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::GenericDomTreeUpdater< MachineDomTreeUpdater, MachineDominatorTree, MachinePostDominatorTree >::Strategy.


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