17#ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H
18#define LLVM_ANALYSIS_DOMINANCEFRONTIER_H
39template <
class BlockT,
bool IsPostDom>
64 assert(
Roots.size() == 1 &&
"Should always have entry node!");
93#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
102template <
class BlockT>
115 "Only one entry block for forward domfronts!");
134 FunctionAnalysisManager::Invalidator &);
159extern template class DominanceFrontierBase<BasicBlock, false>;
160extern template class DominanceFrontierBase<BasicBlock, true>;
161extern template class ForwardDominanceFrontierBase<BasicBlock>;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file defines the DenseMap class.
This file defines a set of templates that efficiently compute a dominator tree over a generic graph.
This file defines the little GraphTraits<X> template class that should be specialized by classes that...
This header defines various interfaces for pass management in LLVM.
This file implements a set that has insertion order iteration characteristics.
Represent the analysis usage information of a pass.
LLVM Basic Block Representation.
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT > iterator
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
Base class for the actual dominator tree node.
Analysis pass which computes a DominanceFrontier.
DominanceFrontier Result
Provide the result type for this analysis pass.
DominanceFrontier run(Function &F, FunctionAnalysisManager &AM)
Run the analysis pass over a function and produce a dominator tree.
void print(raw_ostream &OS) const
print - Convert to human readable form
const_iterator find(BlockT *B) const
GraphTraits< BlockT * > BlockTraits
typename DomSetMapType::iterator iterator
SmallVector< BasicBlock *, IsPostDom ? 4 :1 > Roots
const_iterator end() const
const SmallVectorImpl< BlockT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
static constexpr bool IsPostDominators
void dump() const
dump - Dump the dominance frontier to dbgs().
bool isPostDominator() const
isPostDominator - Returns true if analysis based of postdoms
DenseMap< BlockT *, DomSetType > DomSetMapType
SetVector< BlockT * > DomSetType
typename DomSetMapType::const_iterator const_iterator
const_iterator begin() const
DominanceFrontierBase()=default
DominanceFrontierPrinterPass(raw_ostream &OS)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
const DominanceFrontier & getDominanceFrontier() const
DominanceFrontierWrapperPass()
bool runOnFunction(Function &) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
DominanceFrontier & getDominanceFrontier()
bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &)
Handle invalidation explicitly.
DomTreeNodeBase< BasicBlock > DomTreeNodeT
DomTreeBase< BasicBlock > DomTreeT
DominanceFrontierBase< BasicBlock, false >::iterator iterator
DominanceFrontierBase< BasicBlock, false >::const_iterator const_iterator
DominanceFrontierBase< BasicBlock, false >::DomSetType DomSetType
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...
const DomSetType & calculate(const DomTreeT &DT, const DomTreeNodeT *Node)
void analyze(DomTreeT &DT)
typename DominanceFrontierBase< BlockT, false >::DomSetType DomSetType
DomTreeBase< BlockT > DomTreeT
DomTreeNodeBase< BlockT > DomTreeNodeT
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
A vector that has set insertion semantics.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
DominatorTreeBase< T, false > DomTreeBase
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
A CRTP mix-in to automatically provide informational APIs needed for passes.