Go to the documentation of this file.
23 #define DEBUG_TYPE "postdomtree"
25 #ifdef EXPENSIVE_CHECKS
43 "Post-Dominator Tree Construction",
true,
true)
56 assert(I1 && I2 &&
"Expecting valid I1 and I2");
65 if (isa<PHINode>(I1) && isa<PHINode>(I2))
70 for (; &*
I != I1 && &*
I != I2; ++
I)
109 OS <<
"PostDominatorTree for function: " <<
F.getName() <<
"\n";
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
void print(raw_ostream &O) const
print - Convert to human readable form
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
PostDominatorTree run(Function &F, FunctionAnalysisManager &)
Run the analysis pass over a function and produce a post dominator tree.
This templated class represents "all analyses that operate over <a particular IR unit>" (e....
PostDominatorTreeWrapperPass()
LLVM Basic Block Representation.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
iterator begin()
Instruction iterator methods.
This class implements an extremely fast bulk output stream that can only output to a stream.
FunctionPass * createPostDomTree()
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
void print(raw_ostream &OS, const Module *) const override
print - Print out the internal state of the pass.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
A special type used by analysis passes to provide an address that identifies that particular analysis...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A Module instance is used to store all the information related to an LLVM module.
void recalculate(ParentType &Func)
recalculate - compute a dominator tree for the given function
static constexpr bool ExpensiveChecksEnabled
PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominat...
Represents analyses that only rely on functions' control flow.
bool dominates(const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) const
dominates - Returns true iff A dominates B.
void verifyAnalysis() const override
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...
PostDominatorTreePrinterPass(raw_ostream &OS)
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
void initializePostDominatorTreeWrapperPassPass(PassRegistry &)
INITIALIZE_PASS(PostDominatorTreeWrapperPass, "postdomtree", "Post-Dominator Tree Construction", true, true) bool PostDominatorTree
const BasicBlock * getParent() const
bool verify(VerificationLevel VL=VerificationLevel::Full) const
verify - checks if the tree is correct.
A container for analyses that lazily runs them and caches their results.
FunctionPass class - This class is used to implement most global optimizations.
Analysis pass which computes a PostDominatorTree.
bool dominates(const Instruction *I1, const Instruction *I2) const
Return true if I1 dominates I2.
bool VerifyDomInfo
Enables verification of dominator trees.
InstListType::const_iterator const_iterator