18 #ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H
19 #define LLVM_ANALYSIS_DOMINANCEFRONTIER_H
32 template <
class BlockT>
52 inline const std::vector<BlockT *> &
getRoots()
const {
57 assert(
Roots.size() == 1 &&
"Should always have entry node!");
72 typedef typename DomSetMapType::iterator
iterator;
82 assert(
find(BB) ==
end() &&
"Block already in DominanceFrontier!");
83 return Frontiers.insert(std::make_pair(BB, frontier)).first;
106 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
115 template <
class BlockT>
130 "Only one entry block for forward domfronts!");
167 extern template class DominanceFrontierBase<BasicBlock>;
168 extern template class ForwardDominanceFrontierBase<BasicBlock>;
const bool IsPostDominators
DominanceFrontierBase< BasicBlock >::const_iterator const_iterator
A Module instance is used to store all the information related to an LLVM module. ...
DominanceFrontierWrapperPass()
DominanceFrontier Result
Provide the result typedef for this analysis pass.
std::set< BlockT * > DomSetType
DominatorTreeBase< BlockT > DomTreeT
Printer pass for the DominanceFrontier.
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a...
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const
compareDomSet - Return false if two domsets match.
DominanceFrontierBase< BasicBlock >::DomSetType DomSetType
GraphTraits< BlockT * > BlockTraits
Analysis pass which computes a DominanceFrontier.
const_iterator find(BlockT *B) const
DomTreeNodeBase< BlockT > DomTreeNodeT
const_iterator begin() const
Function Alias Analysis false
Base class for the actual dominator tree node.
static GCRegistry::Add< OcamlGC > B("ocaml","ocaml 3.10-compatible GC")
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
const_iterator end() const
Core dominator tree base class.
DominanceFrontierBase< BasicBlock >::iterator iterator
A set of analyses that are preserved following a run of a transformation pass.
const std::vector< NodeT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
DominatorTreeBase< BasicBlock > DomTreeT
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
void removeFromFrontier(iterator I, BlockT *Node)
void analyze(DomTreeT &DT)
DominanceFrontierBase(bool isPostDom)
const DominanceFrontier & getDominanceFrontier() const
ForwardDominanceFrontierBase()
std::vector< BlockT * > Roots
DomTreeNodeBase< BasicBlock > DomTreeNodeT
std::map< BlockT *, DomSetType > DomSetMapType
void dump() const
dump - Dump the dominance frontier to dbgs().
void print(raw_ostream &OS, const Module *=nullptr) const override
print - Print out the internal state of the pass.
bool runOnFunction(Function &) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass...
DomSetMapType::iterator iterator
DominanceFrontierBase< BlockT >::DomSetType DomSetType
DominanceFrontier & getDominanceFrontier()
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void removeBlock(BlockT *BB)
removeBlock - Remove basic block BB's frontier.
const std::vector< BlockT * > & getRoots() const
getRoots - Return the root blocks of the current CFG.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void print(raw_ostream &OS) const
print - Convert to human readable form
void addToFrontier(iterator I, BlockT *Node)
const DomSetType & calculate(const DomTreeT &DT, const DomTreeNodeT *Node)
This class implements an extremely fast bulk output stream that can only output to a stream...
DomSetMapType::const_iterator const_iterator
iterator addBasicBlock(BlockT *BB, const DomSetType &frontier)
A container for analyses that lazily runs them and caches their results.
bool compare(DominanceFrontierBase< BlockT > &Other) const
compare - Return true if the other dominance frontier base matches this dominance frontier base...
This header defines various interfaces for pass management in LLVM.
bool isPostDominator() const
isPostDominator - Returns true if analysis based of postdoms
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...