class DomTreeUpdater
Declaration
class DomTreeUpdater { /* full declaration omitted */ };
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:26
Method Overview
- public DomTreeUpdater(llvm::DominatorTree & DT_, llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public DomTreeUpdater(llvm::DominatorTree * DT_, llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public DomTreeUpdater(llvm::PostDominatorTree & PDT_, llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public DomTreeUpdater(llvm::PostDominatorTree * PDT_, llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public DomTreeUpdater(llvm::DominatorTree & DT_, llvm::PostDominatorTree & PDT_, llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public DomTreeUpdater(llvm::DominatorTree * DT_, llvm::PostDominatorTree * PDT_, llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public DomTreeUpdater(llvm::DomTreeUpdater::UpdateStrategy Strategy_)
- public void applyUpdates(ArrayRef<DominatorTree::UpdateType> Updates)
- public void applyUpdatesPermissive(ArrayRef<DominatorTree::UpdateType> Updates)
- public void callbackDeleteBB(llvm::BasicBlock * DelBB, std::function<void (BasicBlock *)> Callback)
- public void deleteBB(llvm::BasicBlock * DelBB)
- public void dump() const
- public void flush()
- public llvm::DominatorTree & getDomTree()
- public llvm::PostDominatorTree & getPostDomTree()
- public bool hasDomTree() const
- public bool hasPendingDeletedBB() const
- public bool hasPendingDomTreeUpdates() const
- public bool hasPendingPostDomTreeUpdates() const
- public bool hasPendingUpdates() const
- public bool hasPostDomTree() const
- public bool isBBPendingDeletion(llvm::BasicBlock * DelBB) const
- public bool isEager() const
- public bool isLazy() const
- public void recalculate(llvm::Function & F)
- public ~DomTreeUpdater()
Methods
¶DomTreeUpdater(
llvm::DominatorTree& DT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::DominatorTree& DT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:31
Parameters
- llvm::DominatorTree& DT_
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶DomTreeUpdater(
llvm::DominatorTree* DT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::DominatorTree* DT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:33
Parameters
- llvm::DominatorTree* DT_
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶DomTreeUpdater(
llvm::PostDominatorTree& PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::PostDominatorTree& PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:35
Parameters
- llvm::PostDominatorTree& PDT_
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶DomTreeUpdater(
llvm::PostDominatorTree* PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::PostDominatorTree* PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:37
Parameters
- llvm::PostDominatorTree* PDT_
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶DomTreeUpdater(
llvm::DominatorTree& DT_,
llvm::PostDominatorTree& PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::DominatorTree& DT_,
llvm::PostDominatorTree& PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:39
Parameters
- llvm::DominatorTree& DT_
- llvm::PostDominatorTree& PDT_
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶DomTreeUpdater(
llvm::DominatorTree* DT_,
llvm::PostDominatorTree* PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::DominatorTree* DT_,
llvm::PostDominatorTree* PDT_,
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:42
Parameters
- llvm::DominatorTree* DT_
- llvm::PostDominatorTree* PDT_
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶DomTreeUpdater(
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
DomTreeUpdater(
llvm::DomTreeUpdater::UpdateStrategy
Strategy_)
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:30
Parameters
- llvm::DomTreeUpdater::UpdateStrategy Strategy_
¶void applyUpdates(
ArrayRef<DominatorTree::UpdateType> Updates)
void applyUpdates(
ArrayRef<DominatorTree::UpdateType> Updates)
Description
Submit updates to all available trees. The Eager Strategy flushes updates immediately while the Lazy Strategy queues the updates. Note: The "existence" of an edge in a CFG refers to the CFG which DTU is in sync with + all updates before that single update. CAUTION! 1. It is required for the state of the LLVM IR to be updated *before* submitting the updates because the internal update routine will analyze the current state of the CFG to determine whether an update is valid. 2. It is illegal to submit any update that has already been submitted, i.e., you are supposed not to insert an existent edge or delete a nonexistent edge.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:121
Parameters
- ArrayRef<DominatorTree::UpdateType> Updates
¶void applyUpdatesPermissive(
ArrayRef<DominatorTree::UpdateType> Updates)
void applyUpdatesPermissive(
ArrayRef<DominatorTree::UpdateType> Updates)
Description
Submit updates to all available trees. It will also 1. discard duplicated updates, 2. remove invalid updates. (Invalid updates means deletion of an edge that still exists or insertion of an edge that does not exist.) The Eager Strategy flushes updates immediately while the Lazy Strategy queues the updates. Note: The "existence" of an edge in a CFG refers to the CFG which DTU is in sync with + all updates before that single update. CAUTION! 1. It is required for the state of the LLVM IR to be updated *before* submitting the updates because the internal update routine will analyze the current state of the CFG to determine whether an update is valid. 2. It is illegal to submit any update that has already been submitted, i.e., you are supposed not to insert an existent edge or delete a nonexistent edge. 3. It is only legal to submit updates to an edge in the order CFG changes are made. The order you submit updates on different edges is not restricted.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:144
Parameters
- ArrayRef<DominatorTree::UpdateType> Updates
¶void callbackDeleteBB(
llvm::BasicBlock* DelBB,
std::function<void(BasicBlock*)> Callback)
void callbackDeleteBB(
llvm::BasicBlock* DelBB,
std::function<void(BasicBlock*)> Callback)
Description
Delete DelBB. DelBB will be removed from its Parent and erased from available trees if it exists. Then the callback will be called. Finally, DelBB will be 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. Multiple callbacks can be queued for one DelBB under Lazy UpdateStrategy.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:211
Parameters
- llvm::BasicBlock* DelBB
- std::function<void(BasicBlock*)> Callback
¶void deleteBB(llvm::BasicBlock* DelBB)
void deleteBB(llvm::BasicBlock* DelBB)
Description
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.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:201
Parameters
- llvm::BasicBlock* DelBB
¶void dump() const
void dump() const
Description
Debug method to help view the internal state of this class.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:241
¶void flush()
void flush()
Description
Apply all pending updates to available trees and flush all BasicBlocks awaiting deletion.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:236
¶llvm::DominatorTree& getDomTree()
llvm::DominatorTree& getDomTree()
Description
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.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:226
¶llvm::PostDominatorTree& getPostDomTree()
llvm::PostDominatorTree& getPostDomTree()
Description
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.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:231
¶bool hasDomTree() const
bool hasDomTree() const
Description
Returns true if it holds a DominatorTree.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:55
¶bool hasPendingDeletedBB() const
bool hasPendingDeletedBB() const
Description
Returns true if there is BasicBlock awaiting deletion. The deletion will only happen until a flush event and all available trees are up-to-date. Returns false under Eager UpdateStrategy.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:64
¶bool hasPendingDomTreeUpdates() const
bool hasPendingDomTreeUpdates() const
Description
Returns true if there are DominatorTree updates queued. Returns false under Eager UpdateStrategy or DT is nullptr.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:79
¶bool hasPendingPostDomTreeUpdates() const
bool hasPendingPostDomTreeUpdates() const
Description
Returns true if there are PostDominatorTree updates queued. Returns false under Eager UpdateStrategy or PDT is nullptr.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:83
¶bool hasPendingUpdates() const
bool hasPendingUpdates() const
Description
Returns true if either of DT or PDT is valid and the tree has at least one update pending. If DT or PDT is nullptr it is treated as having no pending updates. This function does not check whether there is BasicBlock awaiting deletion. Returns false under Eager UpdateStrategy.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:75
¶bool hasPostDomTree() const
bool hasPostDomTree() const
Description
Returns true if it holds a PostDominatorTree.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:58
¶bool isBBPendingDeletion(
llvm::BasicBlock* DelBB) const
bool isBBPendingDeletion(
llvm::BasicBlock* DelBB) const
Description
Returns true if DelBB is awaiting deletion. Returns false under Eager UpdateStrategy.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:68
Parameters
- llvm::BasicBlock* DelBB
¶bool isEager() const
bool isEager() const
Description
Returns true if the current strategy is Eager.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:52
¶bool isLazy() const
bool isLazy() const
Description
Returns true if the current strategy is Lazy.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:49
¶void recalculate(llvm::Function& F)
void recalculate(llvm::Function& F)
Description
Notify DTU that the entry block was replaced. Recalculate all available trees and flush all BasicBlocks awaiting deletion immediately.
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:149
Parameters
¶~DomTreeUpdater()
~DomTreeUpdater()
Declared at: llvm/include/llvm/Analysis/DomTreeUpdater.h:46