LLVM 22.0.0git
|
#include "llvm/Support/GenericDomTreeConstruction.h"
Classes | |
struct | BatchUpdateInfo |
struct | BlockNamePrinter |
struct | InfoRec |
struct | InsertionInfo |
Public Types | |
using | NodePtr = typename DomTreeT::NodePtr |
using | NodeT = typename DomTreeT::NodeType |
using | TreeNodePtr = DomTreeNodeBase<NodeT> * |
using | RootsT = decltype(DomTreeT::Roots) |
using | GraphDiffT = GraphDiff<NodePtr, IsPostDom> |
using | UpdateT = typename DomTreeT::UpdateType |
using | UpdateKind = typename DomTreeT::UpdateKind |
using | BatchUpdatePtr = BatchUpdateInfo * |
using | NodeOrderMap = DenseMap<NodePtr, unsigned> |
Public Member Functions | |
SemiNCAInfo (BatchUpdatePtr BUI) | |
void | clear () |
InfoRec & | getNodeInfo (NodePtr BB) |
NodePtr | getIDom (NodePtr BB) |
TreeNodePtr | getNodeForBlock (NodePtr BB, DomTreeT &DT) |
template<bool IsReverse = false, typename DescendCondition> | |
unsigned | runDFS (NodePtr V, unsigned LastNum, DescendCondition Condition, unsigned AttachToNum, const NodeOrderMap *SuccOrder=nullptr) |
unsigned | eval (unsigned V, unsigned LastLinked, SmallVectorImpl< InfoRec * > &Stack, ArrayRef< InfoRec * > NumToInfo) |
void | runSemiNCA () |
void | addVirtualRoot () |
template<typename DescendCondition> | |
void | doFullDFSWalk (const DomTreeT &DT, DescendCondition DC) |
void | attachNewSubtree (DomTreeT &DT, const TreeNodePtr AttachTo) |
void | reattachExistingSubtree (DomTreeT &DT, const TreeNodePtr AttachTo) |
bool | verifyRoots (const DomTreeT &DT) |
bool | verifyReachability (const DomTreeT &DT) |
bool | verifyParentProperty (const DomTreeT &DT) |
bool | verifySiblingProperty (const DomTreeT &DT) |
Public Attributes | |
SmallVector< NodePtr, 64 > | NumToNode = {nullptr} |
std::conditional_t< GraphHasNodeNumbers< NodePtr >, SmallVector< InfoRec, 64 >, DenseMap< NodePtr, InfoRec > > | NodeInfos |
BatchUpdateInfo * | BatchUpdates |
Static Public Attributes | |
static constexpr bool | IsPostDom = DomTreeT::IsPostDominator |
Definition at line 55 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdatePtr = BatchUpdateInfo * |
Definition at line 99 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::GraphDiffT = GraphDiff<NodePtr, IsPostDom> |
Definition at line 61 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodeOrderMap = DenseMap<NodePtr, unsigned> |
Definition at line 182 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodePtr = typename DomTreeT::NodePtr |
Definition at line 56 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodeT = typename DomTreeT::NodeType |
Definition at line 57 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::RootsT = decltype(DomTreeT::Roots) |
Definition at line 59 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::TreeNodePtr = DomTreeNodeBase<NodeT> * |
Definition at line 58 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateKind = typename DomTreeT::UpdateKind |
Definition at line 83 of file GenericDomTreeConstruction.h.
using llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateT = typename DomTreeT::UpdateType |
Definition at line 82 of file GenericDomTreeConstruction.h.
|
inline |
Definition at line 102 of file GenericDomTreeConstruction.h.
References BatchUpdates.
Referenced by CalculateFromScratch(), ComputeUnreachableDominators(), DeleteReachable(), DeleteUnreachable(), FindRoots(), and RemoveRedundantRoots().
|
inline |
Definition at line 326 of file GenericDomTreeConstruction.h.
References assert(), getNodeInfo(), IsPostDom, and NumToNode.
Referenced by doFullDFSWalk(), and FindRoots().
|
inlinestatic |
Definition at line 164 of file GenericDomTreeConstruction.h.
Referenced by CalculateFromScratch(), FindRoots(), RemoveRedundantRoots(), and verifyReachability().
|
inlinestatic |
Definition at line 1180 of file GenericDomTreeConstruction.h.
References llvm::dbgs(), DeleteEdge(), InsertEdge(), LLVM_DEBUG, llvm::GraphDiff< NodePtr, InverseGraph >::popUpdateForIncrementalUpdates(), and llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::PreViewCFG.
Referenced by ApplyUpdates().
|
inlinestatic |
Definition at line 1131 of file GenericDomTreeConstruction.h.
References ApplyNextUpdate(), CalculateFromScratch(), DeleteEdge(), llvm::GraphDiff< NodePtr, InverseGraph >::getNumLegalizedUpdates(), InsertEdge(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::IsRecalculated, llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::NumLegalized, and llvm::GraphDiff< NodePtr, InverseGraph >::popUpdateForIncrementalUpdates().
Referenced by llvm::DomTreeBuilder::ApplyUpdates().
|
inline |
Definition at line 599 of file GenericDomTreeConstruction.h.
References llvm::drop_begin(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getIDom(), getNodeForBlock(), getNodeInfo(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::IDom, and NumToNode.
Referenced by CalculateFromScratch(), and ComputeUnreachableDominators().
|
inlinestatic |
Definition at line 560 of file GenericDomTreeConstruction.h.
References AlwaysDescend(), attachNewSubtree(), llvm::dbgs(), doFullDFSWalk(), FindRoots(), IsPostDom, llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::IsRecalculated, LLVM_DEBUG, llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::PostViewCFG, llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::PreViewCFG, runSemiNCA(), and SemiNCAInfo().
Referenced by ApplyUpdates(), llvm::DomTreeBuilder::Calculate(), llvm::DomTreeBuilder::CalculateWithUpdates(), DeleteReachable(), DeleteUnreachable(), UpdateRootsAfterUpdate(), and UpdateRootsBeforeInsertion().
|
inline |
Definition at line 104 of file GenericDomTreeConstruction.h.
References NodeInfos, and NumToNode.
Referenced by DeleteUnreachable(), RemoveRedundantRoots(), verifyParentProperty(), verifyReachability(), and verifySiblingProperty().
|
inlinestatic |
Definition at line 887 of file GenericDomTreeConstruction.h.
References assert(), attachNewSubtree(), llvm::dbgs(), LLVM_DEBUG, runDFS(), runSemiNCA(), and SemiNCAInfo().
Referenced by InsertUnreachable().
|
inlinestatic |
Definition at line 912 of file GenericDomTreeConstruction.h.
References assert(), llvm::dbgs(), DeleteReachable(), DeleteUnreachable(), getChildren(), llvm::DomTreeNodeBase< NodeT >::getIDom(), HasProperSupport(), llvm::is_contained(), IsPostDom, LLVM_DEBUG, and UpdateRootsAfterUpdate().
Referenced by ApplyNextUpdate(), ApplyUpdates(), and llvm::DomTreeBuilder::DeleteEdge().
|
inlinestatic |
Definition at line 965 of file GenericDomTreeConstruction.h.
References assert(), CalculateFromScratch(), llvm::dbgs(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::DomTreeNodeBase< NodeT >::getLevel(), LLVM_DEBUG, reattachExistingSubtree(), runDFS(), runSemiNCA(), and SemiNCAInfo().
Referenced by DeleteEdge().
|
inlinestatic |
Definition at line 1030 of file GenericDomTreeConstruction.h.
References assert(), CalculateFromScratch(), clear(), llvm::dbgs(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::DomTreeNodeBase< NodeT >::getLevel(), InsertReachable(), llvm::is_contained(), IsPostDom, LLVM_DEBUG, N, NumToNode, llvm::SmallVectorTemplateBase< T, bool >::push_back(), reattachExistingSubtree(), runDFS(), runSemiNCA(), and SemiNCAInfo().
Referenced by DeleteEdge().
|
inline |
Definition at line 548 of file GenericDomTreeConstruction.h.
References addVirtualRoot(), assert(), IsPostDom, and runDFS().
Referenced by CalculateFromScratch(), verifyParentProperty(), verifyReachability(), and verifySiblingProperty().
|
inline |
Definition at line 244 of file GenericDomTreeConstruction.h.
References assert(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::Label, llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::Parent, and llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::Semi.
Referenced by runSemiNCA().
|
inlinestatic |
Definition at line 352 of file GenericDomTreeConstruction.h.
References addVirtualRoot(), AlwaysDescend(), assert(), BatchUpdates, llvm::dbgs(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::DFSNum, getChildren(), GetEntryNode(), getNodeInfo(), HasForwardSuccessors(), I, IsPostDom, LLVM_DEBUG, N, nodes, NumToNode, llvm::SmallVectorTemplateBase< T, bool >::pop_back(), RemoveRedundantRoots(), runDFS(), SemiNCAInfo(), and llvm::Total.
Referenced by CalculateFromScratch(), UpdateRootsAfterUpdate(), and verifyRoots().
|
inlinestatic |
Definition at line 119 of file GenericDomTreeConstruction.h.
References llvm::children(), llvm::erase(), N, and llvm::detail::reverse_if().
|
inlinestatic |
Definition at line 112 of file GenericDomTreeConstruction.h.
References getChildren(), N, and llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdateInfo::PreViewCFG.
Referenced by DeleteEdge(), FindRoots(), getChildren(), HasForwardSuccessors(), HasProperSupport(), InsertReachable(), and runDFS().
|
inlinestatic |
Definition at line 344 of file GenericDomTreeConstruction.h.
References assert().
Referenced by FindRoots(), and verifyRoots().
|
inline |
Definition at line 147 of file GenericDomTreeConstruction.h.
References getNodeInfo(), and llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::IDom.
Referenced by attachNewSubtree(), and getNodeForBlock().
|
inline |
Definition at line 149 of file GenericDomTreeConstruction.h.
References assert(), getIDom(), and getNodeForBlock().
Referenced by attachNewSubtree(), and getNodeForBlock().
|
inline |
Definition at line 130 of file GenericDomTreeConstruction.h.
References llvm::GraphHasNodeNumbers, and NodeInfos.
Referenced by addVirtualRoot(), attachNewSubtree(), FindRoots(), getIDom(), reattachExistingSubtree(), runDFS(), runSemiNCA(), verifyParentProperty(), verifyReachability(), and verifySiblingProperty().
|
inlinestatic |
Definition at line 339 of file GenericDomTreeConstruction.h.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), getChildren(), and N.
Referenced by FindRoots(), and RemoveRedundantRoots().
|
inlinestatic |
Definition at line 1006 of file GenericDomTreeConstruction.h.
References llvm::dbgs(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getChildren(), and LLVM_DEBUG.
Referenced by DeleteEdge().
|
inlinestatic |
Definition at line 648 of file GenericDomTreeConstruction.h.
References assert(), llvm::dbgs(), InsertReachable(), InsertUnreachable(), IsPostDom, and LLVM_DEBUG.
Referenced by ApplyNextUpdate(), ApplyUpdates(), and llvm::DomTreeBuilder::InsertEdge().
|
inlinestatic |
Definition at line 736 of file GenericDomTreeConstruction.h.
References assert(), llvm::dbgs(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getChildren(), llvm::DomTreeNodeBase< NodeT >::getLevel(), II, IsPostDom, LLVM_DEBUG, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), UpdateInsertion(), and UpdateRootsBeforeInsertion().
Referenced by DeleteUnreachable(), InsertEdge(), and InsertUnreachable().
|
inlinestatic |
Definition at line 862 of file GenericDomTreeConstruction.h.
References ComputeUnreachableDominators(), llvm::dbgs(), InsertReachable(), and LLVM_DEBUG.
Referenced by InsertEdge().
|
inlinestatic |
Definition at line 696 of file GenericDomTreeConstruction.h.
References A(), B(), llvm::from_range, and N.
Referenced by UpdateRootsAfterUpdate(), and verifyRoots().
|
inlinestatic |
Definition at line 1532 of file GenericDomTreeConstruction.h.
References llvm::errs(), and llvm::raw_ostream::flush().
Referenced by llvm::DomTreeBuilder::Verify().
|
inline |
Definition at line 618 of file GenericDomTreeConstruction.h.
References assert(), llvm::drop_begin(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getNodeInfo(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::IDom, N, NumToNode, and llvm::DomTreeNodeBase< NodeT >::setIDom().
Referenced by DeleteReachable(), and DeleteUnreachable().
|
inlinestatic |
Definition at line 508 of file GenericDomTreeConstruction.h.
References AlwaysDescend(), assert(), clear(), llvm::dbgs(), HasForwardSuccessors(), llvm::is_contained(), IsPostDom, LLVM_DEBUG, N, NumToNode, runDFS(), SemiNCAInfo(), and std::swap().
Referenced by FindRoots().
|
inline |
Definition at line 195 of file GenericDomTreeConstruction.h.
References A(), assert(), B(), BatchUpdates, llvm::SmallVectorTemplateCommon< T, typename >::empty(), getChildren(), getNodeInfo(), IsPostDom, NumToNode, llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::Parent, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::sort().
Referenced by ComputeUnreachableDominators(), DeleteReachable(), DeleteUnreachable(), doFullDFSWalk(), FindRoots(), and RemoveRedundantRoots().
|
inline |
Definition at line 276 of file GenericDomTreeConstruction.h.
References assert(), eval(), getNodeInfo(), N, NumToNode, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorImpl< T >::reserve().
Referenced by CalculateFromScratch(), ComputeUnreachableDominators(), DeleteReachable(), and DeleteUnreachable().
|
inlinestatic |
Definition at line 842 of file GenericDomTreeConstruction.h.
References assert(), llvm::dbgs(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::DomTreeNodeBase< NodeT >::getLevel(), II, IsPostDom, LLVM_DEBUG, llvm::DomTreeNodeBase< NodeT >::setIDom(), and UpdateRootsAfterUpdate().
Referenced by InsertReachable().
|
inlinestatic |
Definition at line 710 of file GenericDomTreeConstruction.h.
References assert(), CalculateFromScratch(), llvm::dbgs(), FindRoots(), isPermutation(), IsPostDom, LLVM_DEBUG, N, and llvm::none_of().
Referenced by DeleteEdge(), and UpdateInsertion().
|
inlinestatic |
Definition at line 678 of file GenericDomTreeConstruction.h.
References assert(), CalculateFromScratch(), llvm::dbgs(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::is_contained(), IsPostDom, and LLVM_DEBUG.
Referenced by InsertReachable().
|
inlinestatic |
Definition at line 1317 of file GenericDomTreeConstruction.h.
References assert(), llvm::errs(), llvm::raw_ostream::flush(), llvm::DomTreeNodeBase< NodeT >::getDFSNumIn(), IsPostDom, and llvm::sort().
Referenced by llvm::DomTreeBuilder::Verify().
|
inlinestatic |
Definition at line 1283 of file GenericDomTreeConstruction.h.
References llvm::errs(), llvm::raw_ostream::flush(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::DomTreeNodeBase< NodeT >::getIDom(), and llvm::DomTreeNodeBase< NodeT >::getLevel().
Referenced by llvm::DomTreeBuilder::Verify().
|
inline |
Definition at line 1455 of file GenericDomTreeConstruction.h.
References llvm::DomTreeNodeBase< NodeT >::children(), clear(), llvm::dbgs(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::DFSNum, doFullDFSWalk(), llvm::errs(), llvm::raw_ostream::flush(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getNodeInfo(), llvm::DomTreeNodeBase< NodeT >::isLeaf(), and LLVM_DEBUG.
Referenced by llvm::DomTreeBuilder::Verify().
|
inline |
Definition at line 1245 of file GenericDomTreeConstruction.h.
References AlwaysDescend(), clear(), doFullDFSWalk(), llvm::errs(), llvm::raw_ostream::flush(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getNodeInfo(), N, and NumToNode.
Referenced by llvm::DomTreeBuilder::Verify().
|
inline |
Definition at line 1206 of file GenericDomTreeConstruction.h.
References llvm::errs(), FindRoots(), llvm::raw_ostream::flush(), GetEntryNode(), isPermutation(), IsPostDom, and N.
Referenced by llvm::DomTreeBuilder::Verify().
|
inline |
Definition at line 1491 of file GenericDomTreeConstruction.h.
References llvm::DomTreeNodeBase< NodeT >::children(), clear(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::InfoRec::DFSNum, doFullDFSWalk(), llvm::errs(), llvm::raw_ostream::flush(), llvm::DomTreeNodeBase< NodeT >::getBlock(), getNodeInfo(), llvm::DomTreeNodeBase< NodeT >::isLeaf(), and N.
Referenced by llvm::DomTreeBuilder::Verify().
BatchUpdateInfo* llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::BatchUpdates |
Definition at line 98 of file GenericDomTreeConstruction.h.
Referenced by FindRoots(), runDFS(), and SemiNCAInfo().
|
staticconstexpr |
Definition at line 60 of file GenericDomTreeConstruction.h.
Referenced by addVirtualRoot(), CalculateFromScratch(), DeleteEdge(), DeleteUnreachable(), doFullDFSWalk(), FindRoots(), InsertEdge(), InsertReachable(), RemoveRedundantRoots(), runDFS(), UpdateInsertion(), UpdateRootsAfterUpdate(), UpdateRootsBeforeInsertion(), VerifyDFSNumbers(), and verifyRoots().
std::conditional_t<GraphHasNodeNumbers<NodePtr>, SmallVector<InfoRec, 64>, DenseMap<NodePtr, InfoRec> > llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NodeInfos |
Definition at line 80 of file GenericDomTreeConstruction.h.
Referenced by clear(), and getNodeInfo().
SmallVector<NodePtr, 64> llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::NumToNode = {nullptr} |
Definition at line 75 of file GenericDomTreeConstruction.h.
Referenced by addVirtualRoot(), attachNewSubtree(), clear(), DeleteUnreachable(), FindRoots(), reattachExistingSubtree(), RemoveRedundantRoots(), runDFS(), runSemiNCA(), and verifyReachability().