17#ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H
18#define LLVM_ANALYSIS_DOMINANCEFRONTIER_H
39template <
class BlockT,
bool IsPostDom>
89 assert(
find(BB) ==
end() &&
"Block already in DominanceFrontier!");
113#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
122template <
class BlockT>
135 "Only one entry block for forward domfronts!");
179extern template class DominanceFrontierBase<BasicBlock, false>;
180extern template class DominanceFrontierBase<BasicBlock, true>;
181extern template class ForwardDominanceFrontierBase<BasicBlock>;
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.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements a set that has insertion order iteration characteristics.
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
iterator find(const_arg_type_t< KeyT > Val)
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT > iterator
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Base class for the actual dominator tree node.
Analysis pass which computes a DominanceFrontier.
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
bool compare(DominanceFrontierBase &Other) const
compare - Return false if the other dominance frontier base matches this dominance frontier base.
void print(raw_ostream &OS) const
print - Convert to human readable form
iterator addBasicBlock(BlockT *BB, const DomSetType &frontier)
const_iterator find(BlockT *B) const
typename DomSetMapType::iterator iterator
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
compareDomSet - Return false if two domsets match.
SmallVector< BlockT *, IsPostDom ? 4 :1 > Roots
const_iterator end() const
const SmallVectorImpl< BlockT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
void removeFromFrontier(iterator I, BlockT *Node)
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
SetVector< BlockT * > DomSetType
typename DomSetMapType::const_iterator const_iterator
void addToFrontier(iterator I, BlockT *Node)
const_iterator begin() const
DominanceFrontierBase()=default
void removeBlock(BlockT *BB)
removeBlock - Remove basic block BB's frontier.
Printer pass for the DominanceFrontier.
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.
DominanceFrontierBase< BasicBlock, false >::iterator iterator
DominanceFrontierBase< BasicBlock, false >::DomSetType DomSetType
DominanceFrontierBase< BasicBlock, false >::const_iterator const_iterator
Core dominator tree base class.
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
FunctionPass class - This class is used to implement most global optimizations.
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.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
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.