15 #ifndef LLVM_IR_DOMINATORS_H 16 #define LLVM_IR_DOMINATORS_H 36 extern template class DomTreeNodeBase<BasicBlock>;
37 extern template class DominatorTreeBase<BasicBlock, false>;
38 extern template class DominatorTreeBase<BasicBlock, true>;
40 namespace DomTreeBuilder {
80 Start(Start_), End(End_) {}
85 BasicBlockEdge(
const std::pair<const BasicBlock *, const BasicBlock *> &Pair)
97 bool isSingleEdge()
const;
106 return BasicBlockEdge(BBInfo::getEmptyKey(), BBInfo::getEmptyKey());
110 return BasicBlockEdge(BBInfo::getTombstoneKey(), BBInfo::getTombstoneKey());
115 BBInfo::getHashValue(Edge.
getEnd()));
154 using Base::dominates;
172 using Base::isReachableFromEntry;
175 bool isReachableFromEntry(
const Use &U)
const;
220 return df_end(getEntryNode(N));
269 void verifyAnalysis()
const override;
369 #endif // LLVM_IR_DOMINATORS_H typename std::vector< DomTreeNodeBase *>::const_iterator const_iterator
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Compute iterated dominance frontiers using a linear time algorithm.
DominatorTree(Function &F)
A Module instance is used to store all the information related to an LLVM module. ...
static bool isEqual(const BasicBlockEdge &LHS, const BasicBlockEdge &RHS)
template void DeleteEdge< BBPostDomTree >(BBPostDomTree &DT, BasicBlock *From, BasicBlock *To)
static NodeRef getEntryNode(NodeRef N)
template void ApplyUpdates< BBDomTree >(BBDomTree &DT, BBUpdates)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Analysis pass which computes a DominatorTree.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
const BasicBlock * getEnd() const
static nodes_iterator nodes_begin(NodeRef N)
static nodes_iterator nodes_begin(DominatorTree *N)
void initializeDominatorTreeWrapperPassPass(PassRegistry &)
DominatorTreeWrapperPass()
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
BasicBlockEdge(const std::pair< BasicBlock *, BasicBlock *> &Pair)
static BasicBlockEdge getEmptyKey()
A Use represents the edge between a Value definition and its users.
DominatorTree & getDomTree()
VPDomTreeNode::const_iterator ChildIteratorType
template void ApplyUpdates< BBPostDomTree >(BBPostDomTree &DT, BBUpdates)
static bool isEqual(const Function &Caller, const Function &Callee)
static nodes_iterator nodes_end(DominatorTree *N)
A CRTP mix-in to automatically provide informational APIs needed for passes.
DeferredDominance(DominatorTree &DT_)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
static nodes_iterator nodes_end(NodeRef N)
Core dominator tree base class.
static bool runOnFunction(Function &F, bool PostInlining)
typename DomTreeNode *::UnknownGraphTypeError NodeRef
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
A set of analyses that are preserved following a run of a transformation pass.
template bool Verify< BBDomTree >(const BBDomTree &DT, BBDomTree::VerificationLevel VL)
LLVM Basic Block Representation.
DominatorTree run(Function &F, FunctionAnalysisManager &)
Run the analysis pass over a function and produce a dominator tree.
df_iterator< T > df_end(const T &G)
A CRTP mix-in that provides informational APIs needed for analysis passes.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
Printer pass for the DominatorTree.
template void Calculate< BBDomTree >(BBDomTree &DT)
DomTreeNodeBase< NodeT > * getRootNode()
getRootNode - This returns the entry node for the CFG of the function.
ArrayRef< Update< BasicBlock * > > BBUpdates
Verifier pass for the DominatorTree.
static ChildIteratorType child_begin(NodeRef N)
static ChildIteratorType child_end(NodeRef N)
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
template void InsertEdge< BBPostDomTree >(BBPostDomTree &DT, BasicBlock *From, BasicBlock *To)
const DominatorTree & getDomTree() const
df_iterator< T > df_begin(const T &G)
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
Class to defer updates to a DominatorTree.
void setPreservesAll()
Set by analyses that do not transform their input at all.
DomTreeBuilder::UpdateKind UpdateKind
template void DeleteEdge< BBDomTree >(BBDomTree &DT, BasicBlock *From, BasicBlock *To)
static unsigned getHashValue(const BasicBlockEdge &Edge)
static NodeRef getEntryNode(DominatorTree *DT)
API to communicate dependencies between analyses during invalidation.
template bool Verify< BBPostDomTree >(const BBPostDomTree &DT, BBPostDomTree::VerificationLevel VL)
BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_)
const BasicBlock * getStart() const
DomTreeNodeBase< BasicBlock > DomTreeNode
template void Calculate< BBPostDomTree >(BBPostDomTree &DT)
This class implements an extremely fast bulk output stream that can only output to a stream...
This file defines a set of templates that efficiently compute a dominator tree over a generic graph...
A container for analyses that lazily runs them and caches their results.
Legacy analysis pass which computes a DominatorTree.
This header defines various interfaces for pass management in LLVM.
A special type used by analysis passes to provide an address that identifies that particular analysis...
BasicBlockEdge(const std::pair< const BasicBlock *, const BasicBlock *> &Pair)
template void InsertEdge< BBDomTree >(BBDomTree &DT, BasicBlock *From, BasicBlock *To)
static BasicBlockEdge getTombstoneKey()