14 #ifndef LLVM_IR_DOMINATORS_H 15 #define LLVM_IR_DOMINATORS_H 35 extern template class DomTreeNodeBase<BasicBlock>;
36 extern template class DominatorTreeBase<BasicBlock, false>;
37 extern template class DominatorTreeBase<BasicBlock, true>;
39 extern template class cfg::Update<BasicBlock *>;
41 namespace DomTreeBuilder {
82 Start(Start_), End(End_) {}
87 BasicBlockEdge(
const std::pair<const BasicBlock *, const BasicBlock *> &Pair)
99 bool isSingleEdge()
const;
108 return BasicBlockEdge(BBInfo::getEmptyKey(), BBInfo::getEmptyKey());
112 return BasicBlockEdge(BBInfo::getTombstoneKey(), BBInfo::getTombstoneKey());
117 BBInfo::getHashValue(Edge.
getEnd()));
151 recalculate(*DT.
Parent, U);
159 using Base::dominates;
177 using Base::isReachableFromEntry;
180 bool isReachableFromEntry(
const Use &U)
const;
225 return df_end(getEntryNode(N));
272 void verifyAnalysis()
const override;
284 #endif // LLVM_IR_DOMINATORS_H typename std::vector< DomTreeNodeBase *>::const_iterator const_iterator
This class represents lattice values for constants.
DominatorTree(Function &F)
A Module instance is used to store all the information related to an LLVM module. ...
static bool isEqual(const BasicBlockEdge &LHS, const BasicBlockEdge &RHS)
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
template void DeleteEdge< BBPostDomTree >(BBPostDomTree &DT, BasicBlock *From, BasicBlock *To)
static NodeRef getEntryNode(NodeRef N)
template void ApplyUpdates< BBDomTree >(BBDomTree &DT, BBUpdates)
template void CalculateWithUpdates< BBDomTree >(BBDomTree &DT, BBUpdates U)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Analysis pass which computes a DominatorTree.
const BasicBlock * getEnd() const
static nodes_iterator nodes_begin(NodeRef N)
static nodes_iterator nodes_begin(DominatorTree *N)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
BasicBlockEdge(const std::pair< BasicBlock *, BasicBlock *> &Pair)
static BasicBlockEdge getEmptyKey()
A Use represents the edge between a Value definition and its users.
DominatorTree & getDomTree()
VPDomTreeNode::const_iterator ChildIteratorType
template void ApplyUpdates< BBPostDomTree >(BBPostDomTree &DT, BBUpdates)
static bool isEqual(const Function &Caller, const Function &Callee)
static nodes_iterator nodes_end(DominatorTree *N)
A CRTP mix-in to automatically provide informational APIs needed for passes.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
static nodes_iterator nodes_end(NodeRef N)
Core dominator tree base class.
static bool runOnFunction(Function &F, bool PostInlining)
typename DomTreeNode *::UnknownGraphTypeError NodeRef
A set of analyses that are preserved following a run of a transformation pass.
template bool Verify< BBDomTree >(const BBDomTree &DT, BBDomTree::VerificationLevel VL)
LLVM Basic Block Representation.
DominatorTree run(Function &F, FunctionAnalysisManager &)
Run the analysis pass over a function and produce a dominator tree.
df_iterator< T > df_end(const T &G)
A CRTP mix-in that provides informational APIs needed for analysis passes.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
Printer pass for the DominatorTree.
ArrayRef< llvm::cfg::Update< BasicBlock * > > BBUpdates
template void Calculate< BBDomTree >(BBDomTree &DT)
DomTreeNodeBase< NodeT > * getRootNode()
getRootNode - This returns the entry node for the CFG of the function.
Verifier pass for the DominatorTree.
static ChildIteratorType child_begin(NodeRef N)
static ChildIteratorType child_end(NodeRef N)
BlockVerifier::State From
DominatorTree(DominatorTree &DT, DomTreeBuilder::BBUpdates U)
template void InsertEdge< BBPostDomTree >(BBPostDomTree &DT, BasicBlock *From, BasicBlock *To)
const DominatorTree & getDomTree() const
df_iterator< T > df_begin(const T &G)
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
void setPreservesAll()
Set by analyses that do not transform their input at all.
template void DeleteEdge< BBDomTree >(BBDomTree &DT, BasicBlock *From, BasicBlock *To)
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
static unsigned getHashValue(const BasicBlockEdge &Edge)
static NodeRef getEntryNode(DominatorTree *DT)
API to communicate dependencies between analyses during invalidation.
template bool Verify< BBPostDomTree >(const BBPostDomTree &DT, BBPostDomTree::VerificationLevel VL)
BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_)
const BasicBlock * getStart() const
DomTreeNodeBase< BasicBlock > DomTreeNode
template void Calculate< BBPostDomTree >(BBPostDomTree &DT)
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.
Legacy analysis pass which computes a DominatorTree.
This header defines various interfaces for pass management in LLVM.
A special type used by analysis passes to provide an address that identifies that particular analysis...
BasicBlockEdge(const std::pair< const BasicBlock *, const BasicBlock *> &Pair)
template void InsertEdge< BBDomTree >(BBDomTree &DT, BasicBlock *From, BasicBlock *To)
static BasicBlockEdge getTombstoneKey()