14 #ifndef LLVM_ANALYSIS_POSTDOMINATORS_H
15 #define LLVM_ANALYSIS_POSTDOMINATORS_H
41 inline const std::vector<BasicBlock*> &
getRoots()
const {
107 return df_end(getEntryNode(N));
111 return df_end(getEntryNode(N));
bool properlyDominates(const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) const
properlyDominates - Returns true iff A dominates B and A != B.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
const BasicBlock * findNearestCommonDominator(const BasicBlock *A, const BasicBlock *B)
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass...
A Module instance is used to store all the information related to an LLVM module. ...
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
void getDescendants(NodeT *R, SmallVectorImpl< NodeT * > &Result) const
Get all nodes dominated by R, including R itself.
bool properlyDominates(BasicBlock *A, BasicBlock *B) const
static NodeType * getEntryNode(PostDominatorTree *DT)
DominatorTreeBase< BasicBlock > * DT
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
DomTreeNodeBase< NodeT > * getRootNode()
getRootNode - This returns the entry node for the CFG of the function.
static nodes_iterator nodes_end(PostDominatorTree *N)
~PostDominatorTree() override
const std::vector< BasicBlock * > & getRoots() const
Base class for the actual dominator tree node.
void print(raw_ostream &OS, const Module *) const override
print - Print out the internal state of the pass.
const std::vector< NodeT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
LLVM Basic Block Representation.
bool dominates(const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) const
dominates - Returns true iff A dominates B.
df_iterator< T > df_end(const T &G)
static nodes_iterator nodes_begin(PostDominatorTree *N)
DomTreeNode * operator[](BasicBlock *BB) const
Represent the analysis usage information of a pass.
void getDescendants(BasicBlock *R, SmallVectorImpl< BasicBlock * > &Result) const
Get all nodes post-dominated by R, including R itself.
FunctionPass class - This class is used to implement most global optimizations.
bool dominates(const BasicBlock *A, const BasicBlock *B) const
NodeT * findNearestCommonDominator(NodeT *A, NodeT *B)
findNearestCommonDominator - Find nearest common dominator basic block for basic block A and B...
bool dominates(DomTreeNode *A, DomTreeNode *B) const
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
df_iterator< T > df_begin(const T &G)
void initializePostDominatorTreePass(PassRegistry &)
void setPreservesAll()
Set by analyses that do not transform their input at all.
PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominat...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
bool properlyDominates(const DomTreeNode *A, DomTreeNode *B) const
BasicBlock * findNearestCommonDominator(BasicBlock *A, BasicBlock *B)
DomTreeNode * getRootNode() const
FunctionPass * createPostDomTree()
This class implements an extremely fast bulk output stream that can only output to a stream...
DomTreeNodeBase< NodeT > * getNode(NodeT *BB) const
getNode - return the (Post)DominatorTree node for the specified basic block.
DomTreeNode * getNode(BasicBlock *BB) const