18 #ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H 19 #define LLVM_ANALYSIS_DOMINANCEFRONTIER_H 22 #include "llvm/Config/llvm-config.h" 41 template <
class BlockT,
bool IsPostDom>
64 assert(Roots.
size() == 1 &&
"Should always have entry node!");
78 using iterator =
typename DomSetMapType::iterator;
89 assert(
find(BB) ==
end() &&
"Block already in DominanceFrontier!");
90 return Frontiers.insert(std::make_pair(BB, frontier)).first;
113 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 122 template <
class BlockT>
135 "Only one entry block for forward domfronts!");
137 calculate(DT, DT[this->Roots[0]]);
211 #endif // LLVM_ANALYSIS_DOMINANCEFRONTIER_H DominanceFrontierBase< BasicBlock, false >::const_iterator const_iterator
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
void addToFrontier(iterator I, BlockT *Node)
const_iterator find(BlockT *B) const
Printer pass for the DominanceFrontier.
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
bool isPostDominator() const
isPostDominator - Returns true if analysis based of postdoms
typename DomSetMapType::const_iterator const_iterator
void print(raw_ostream &OS) const
print - Convert to human readable form
std::map< BasicBlock *, DomSetType > DomSetMapType
Analysis pass which computes a DominanceFrontier.
void dump() const
dump - Dump the dominance frontier to dbgs().
DominanceFrontierBase< BasicBlock, false >::DomSetType DomSetType
static constexpr bool IsPostDominators
const SmallVectorImpl< NodeT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
const SmallVectorImpl< BlockT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
DominanceFrontierBase< BasicBlock, false >::iterator iterator
void removeFromFrontier(iterator I, BlockT *Node)
Core dominator tree base class.
static bool runOnFunction(Function &F, bool PostInlining)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
A set of analyses that are preserved following a run of a transformation pass.
Represent the analysis usage information of a pass.
std::set< BasicBlock *> DomSetType
FunctionPass class - This class is used to implement most global optimizations.
bool compare(DominanceFrontierBase &Other) const
compare - Return true if the other dominance frontier base matches this dominance frontier base...
void analyze(DomTreeT &DT)
DominanceFrontierBase()=default
iterator addBasicBlock(BlockT *BB, const DomSetType &frontier)
SmallVector< BlockT *, IsPostDom ? 4 :1 > Roots
DominanceFrontier & getDominanceFrontier()
const DominanceFrontier & getDominanceFrontier() const
void removeBlock(BlockT *BB)
removeBlock - Remove basic block BB's frontier.
const_iterator end() const
API to communicate dependencies between analyses during invalidation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
This header defines various interfaces for pass management in LLVM.
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
compareDomSet - Return false if two domsets match.
const_iterator begin() const
typename DomSetMapType::iterator iterator
A special type used by analysis passes to provide an address that identifies that particular analysis...
DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is used to compute a forwar...