Provides a uniform way to update dominator tree related data structures.
Synopsis
Declared in <llvm/Analysis/GenericDomTreeUpdater.h>
template<
typename DerivedT,
typename DomTreeT,
typename PostDomTreeT>
class GenericDomTreeUpdater;
Description
CRTP base that applies CFG updates to DomTreeT and/or PostDomTreeT under Eager or Lazy strategies. Derived classes specialize basic‐block deletion for their IR or Machine IR representation.
Type Aliases
Name |
Description |
Basic‐block type used by the dominator trees being updated. |
|
CFG edge update type used by the dominator trees being updated. |
Enums
Name |
Description |
Controls whether CFG updates are applied immediately or deferred. |
Member Functions
Name |
Description |
|
Constructors |
|
Assert that pending updates were flushed, then destroy this updater. |
Submit updates to all available trees. |
|
Submit updates to all available trees, filtering duplicates and invalids. |
|
Debug method to help view the internal state of this class. |
|
Apply all pending updates to available trees and flush all BasicBlocks awaiting deletion. |
|
Flush DomTree updates and return DomTree. It flushes Deleted BBs if both trees are up‐to‐date. It must only be called when it has a DomTree. |
|
Flush PostDomTree updates and return PostDomTree. It flushes Deleted BBs if both trees are up‐to‐date. It must only be called when it has a PostDomTree. |
|
Returns true if it holds a DomTreeT. |
|
Returns true if a basic block is awaiting deletion. |
|
Returns true if there are DomTreeT updates queued. Returns false under Eager UpdateStrategy or DT is nullptr. |
|
Returns true if there are PostDomTreeT updates queued. Returns false under Eager UpdateStrategy or PDT is nullptr. |
|
Returns true if either DT or PDT has at least one update pending. |
|
Returns true if it holds a PostDomTreeT. |
|
Returns true if DelBB is awaiting deletion. |
|
Returns true if the current strategy is Eager. |
|
Returns true if the current strategy is Lazy. |
|
Notify DTU that the entry block was replaced. |
|
Apply updates that the critical edge (FromBB, ToBB) has been split with NewBB. |
Protected Types
Name |
Description |
Helper structure used to hold all the basic blocks involved in the split of a critical edge. |
|
Pending CFG update, either a normal edge update or a critical‐edge split. |
Protected Member Functions
Name |
Description |
Helper function to apply all pending DomTree updates. |
|
Helper function to apply all pending PostDomTree updates. |
|
Drop all updates applied by all available trees and delete BasicBlocks if all available trees are up‐to‐date. |
|
Erase Basic Block node before it is unlinked from Function in the DomTree and PostDomTree. |
|
Returns true if the update is self dominance. |
|
Returns true if the update appears in the LLVM IR. |
|
Helper function to flush deleted BasicBlocks if all available trees are up‐to‐date. |
Protected Data Members
Name |
Description |
Dominator tree being updated, or null if none is held. |
|
Basic blocks awaiting deletion under the Lazy strategy. |
|
True while the dominator tree is being fully recalculated. |
|
True while the post‐dominator tree is being fully recalculated. |
|
Post‐dominator tree being updated, or null if none is held. |
|
Index of the next pending update to apply to the dominator tree. |
|
Index of the next pending update to apply to the post‐dominator tree. |
|
Queued CFG updates not yet applied to available trees. |
|
Whether updates are applied eagerly or lazily. |
Derived Classes
Name |
Description |
Updates DominatorTree and PostDominatorTree for LLVM IR basic blocks. |
|
Updates MachineDominatorTree and MachinePostDominatorTree. |
Created with MrDocs