14#ifndef LLVM_IR_DOMINATORS_H
15#define LLVM_IR_DOMINATORS_H
103 Start(Start_), End(End_) {}
106 : Start(Pair.first), End(Pair.second) {}
109 : Start(Pair.first), End(Pair.second) {}
129 return BasicBlockEdge(BBInfo::getEmptyKey(), BBInfo::getEmptyKey());
133 return BasicBlockEdge(BBInfo::getTombstoneKey(), BBInfo::getTombstoneKey());
137 return hash_combine(BBInfo::getHashValue(Edge.getStart()),
138 BBInfo::getHashValue(Edge.getEnd()));
142 return BBInfo::isEqual(
LHS.getStart(),
RHS.getStart()) &&
143 BBInfo::isEqual(
LHS.getEnd(),
RHS.getEnd());
177 FunctionAnalysisManager::Invalidator &);
180 using Base::dominates;
222 using Base::isReachableFromEntry;
225 LLVM_ABI bool isReachableFromEntry(
const Use &U)
const;
228 using Base::findNearestCommonDominator;
This file implements a class to represent arbitrary precision integral constant values and operations...
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
#define LLVM_TEMPLATE_ABI
This file defines DenseMapInfo traits for DenseMap.
This file builds on the ADT/GraphTraits.h file to build generic depth first graph iterator.
This file defines a set of templates that efficiently compute a dominator tree over a generic graph.
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
This header defines various interfaces for pass management in LLVM.
This defines the Use class.
This file defines the PointerIntPair class.
static bool dominates(InstrPosIndexes &PosIndexes, const MachineInstr &A, const MachineInstr &B)
This file defines the SmallVector class.
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
const BasicBlock * getEnd() const
const BasicBlock * getStart() const
BasicBlockEdge(const std::pair< const BasicBlock *, const BasicBlock * > &Pair)
BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_)
BasicBlockEdge(const std::pair< BasicBlock *, BasicBlock * > &Pair)
LLVM Basic Block Representation.
InstListType::iterator iterator
Instruction iterators...
Base class for the actual dominator tree node.
typename SmallVector< DomTreeNodeBase *, 4 >::const_iterator const_iterator
Analysis pass which computes a DominatorTree.
LLVM_ABI DominatorTree run(Function &F, FunctionAnalysisManager &)
Run the analysis pass over a function and produce a dominator tree.
DominatorTree Result
Provide the result typedef for this analysis pass.
Core dominator tree base class.
DomTreeNodeBase< NodeT > * getRootNode()
getRootNode - This returns the entry node for the CFG of the function.
DominatorTreeBase()=default
void recalculate(ParentType &Func)
LLVM_ABI DominatorTreePrinterPass(raw_ostream &OS)
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
DominatorTreeWrapperPass()
DominatorTree & getDomTree()
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
const DominatorTree & getDomTree() const
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void verifyAnalysis() const override
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis infor...
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
bool dominates(const Value *Def, BasicBlock::iterator User) const
DominatorTreeBase< BasicBlock, false > Base
DominatorTree(Function &F)
DominatorTree(DominatorTree &DT, DomTreeBuilder::BBUpdates U)
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.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
A Use represents the edge between a Value definition and its users.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
bool Verify(const DomTreeT &DT, typename DomTreeT::VerificationLevel VL)
GraphDiff< BasicBlock *, false > BBDomTreeGraphDiff
void CalculateWithUpdates(DomTreeT &DT, ArrayRef< typename DomTreeT::UpdateType > Updates)
ArrayRef< llvm::cfg::Update< BasicBlock * > > BBUpdates
GraphDiff< BasicBlock *, true > BBPostDomTreeGraphDiff
void DeleteEdge(DomTreeT &DT, typename DomTreeT::NodePtr From, typename DomTreeT::NodePtr To)
void Calculate(DomTreeT &DT)
PostDomTreeBase< BasicBlock > BBPostDomTree
void ApplyUpdates(DomTreeT &DT, GraphDiff< typename DomTreeT::NodePtr, DomTreeT::IsPostDominator > &PreViewCFG, GraphDiff< typename DomTreeT::NodePtr, DomTreeT::IsPostDominator > *PostViewCFG)
void InsertEdge(DomTreeT &DT, typename DomTreeT::NodePtr From, typename DomTreeT::NodePtr To)
DomTreeBase< BasicBlock > BBDomTree
This is an optimization pass for GlobalISel generic memory operations.
df_iterator< T > df_begin(const T &G)
DominatorTreeBase< T, true > PostDomTreeBase
DomTreeNodeBase< BasicBlock > DomTreeNode
DominatorTreeBase< T, false > DomTreeBase
LLVM_ABI bool VerifyDomInfo
Enables verification of dominator trees.
df_iterator< T > df_end(const T &G)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
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...
static BasicBlockEdge getEmptyKey()
static BasicBlockEdge getTombstoneKey()
DenseMapInfo< const BasicBlock * > BBInfo
static unsigned getHashValue(const BasicBlockEdge &Edge)
static LLVM_ABI unsigned getHashValue(const BasicBlockEdge *V)
static bool isEqual(const BasicBlockEdge &LHS, const BasicBlockEdge &RHS)
An information struct used to provide DenseMap with the various necessary components for a given valu...
static ChildIteratorType child_end(NodeRef N)
static NodeRef getEntryNode(NodeRef N)
ChildIterator ChildIteratorType
df_iterator< Node *, df_iterator_default_set< Node * > > nodes_iterator
static nodes_iterator nodes_begin(NodeRef N)
static nodes_iterator nodes_end(NodeRef N)
static ChildIteratorType child_begin(NodeRef N)
Verifier pass for the DominatorTree.
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static nodes_iterator nodes_end(DominatorTree *N)
static NodeRef getEntryNode(DominatorTree *DT)
static nodes_iterator nodes_begin(DominatorTree *N)
typename DominatorTree *::UnknownGraphTypeError NodeRef
A CRTP mix-in to automatically provide informational APIs needed for passes.