LLVM 20.0.0git
|
Data Dependency Graph. More...
#include "llvm/Analysis/DDG.h"
Public Types | |
using | NodeType = DDGNode |
using | EdgeType = DDGEdge |
Public Types inherited from llvm::DirectedGraph< NodeType, EdgeType > | |
using | iterator = typename NodeListTy::iterator |
using | const_iterator = typename NodeListTy::const_iterator |
using | DGraphType = DirectedGraph< NodeType, EdgeType > |
Public Types inherited from llvm::DependenceGraphInfo< NodeType > | |
using | DependenceList = SmallVector< std::unique_ptr< Dependence >, 1 > |
Public Member Functions | |
DataDependenceGraph ()=delete | |
DataDependenceGraph (const DataDependenceGraph &G)=delete | |
DataDependenceGraph (DataDependenceGraph &&G) | |
DataDependenceGraph (Function &F, DependenceInfo &DI) | |
DataDependenceGraph (Loop &L, LoopInfo &LI, DependenceInfo &DI) | |
~DataDependenceGraph () | |
const PiBlockDDGNode * | getPiBlock (const NodeType &N) const |
If node N belongs to a pi-block return a pointer to the pi-block, otherwise return null. | |
Public Member Functions inherited from llvm::DirectedGraph< NodeType, EdgeType > | |
DirectedGraph ()=default | |
DirectedGraph (NodeType &N) | |
DirectedGraph (const DGraphType &G) | |
DirectedGraph (DGraphType &&RHS) | |
DGraphType & | operator= (const DGraphType &G) |
DGraphType & | operator= (const DGraphType &&G) |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
const NodeType & | front () const |
NodeType & | front () |
const NodeType & | back () const |
NodeType & | back () |
size_t | size () const |
const_iterator | findNode (const NodeType &N) const |
Find the given node N in the table. | |
iterator | findNode (const NodeType &N) |
bool | addNode (NodeType &N) |
Add the given node N to the graph if it is not already present. | |
bool | findIncomingEdgesToNode (const NodeType &N, SmallVectorImpl< EdgeType * > &EL) const |
Collect in EL all edges that are coming into node N . | |
bool | removeNode (NodeType &N) |
Remove the given node N from the graph. | |
bool | connect (NodeType &Src, NodeType &Dst, EdgeType &E) |
Assuming nodes Src and Dst are already in the graph, connect node Src to node Dst using the provided edge E . | |
Public Member Functions inherited from llvm::DependenceGraphInfo< NodeType > | |
DependenceGraphInfo ()=delete | |
DependenceGraphInfo (const DependenceGraphInfo &G)=delete | |
DependenceGraphInfo (const std::string &N, const DependenceInfo &DepInfo) | |
DependenceGraphInfo (DependenceGraphInfo &&G) | |
virtual | ~DependenceGraphInfo ()=default |
StringRef | getName () const |
Return the label that is used to name this graph. | |
NodeType & | getRoot () const |
Return the root node of the graph. | |
bool | getDependencies (const NodeType &Src, const NodeType &Dst, DependenceList &Deps) const |
Collect all the data dependency infos coming from any pair of memory accesses from Src to Dst , and store them into Deps . | |
std::string | getDependenceString (const NodeType &Src, const NodeType &Dst) const |
Return a string representing the type of dependence that the dependence analysis identified between the two given nodes. | |
Protected Member Functions | |
bool | addNode (NodeType &N) |
Add node N to the graph, if it's not added yet, and keep track of the root node as well as pi-blocks and their members. | |
Friends | |
class | DDGBuilder |
Additional Inherited Members | |
Protected Types inherited from llvm::DirectedGraph< NodeType, EdgeType > | |
using | NodeListTy = SmallVector< NodeType *, 10 > |
using | EdgeListTy = SmallVector< EdgeType *, 10 > |
Protected Attributes inherited from llvm::DirectedGraph< NodeType, EdgeType > | |
NodeListTy | Nodes |
Protected Attributes inherited from llvm::DependenceGraphInfo< NodeType > | |
std::string | Name |
const DependenceInfo | DI |
NodeType * | Root = nullptr |
|
delete |
|
delete |
|
inline |
DataDependenceGraph::DataDependenceGraph | ( | Function & | F, |
DependenceInfo & | DI | ||
) |
Definition at line 186 of file DDG.cpp.
References llvm::append_range(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), D, DDGBuilder, llvm::SmallVectorTemplateCommon< T, typename >::end(), F, llvm::make_range(), llvm::scc_begin(), and llvm::scc_end().
DataDependenceGraph::DataDependenceGraph | ( | Loop & | L, |
LoopInfo & | LI, | ||
DependenceInfo & | DI | ||
) |
Definition at line 197 of file DDG.cpp.
References llvm::append_range(), llvm::LoopBlocksDFS::beginRPO(), D, DDGBuilder, llvm::LoopBlocksDFS::endRPO(), llvm::make_range(), and llvm::LoopBlocksDFS::perform().
DataDependenceGraph::~DataDependenceGraph | ( | ) |
Definition at line 212 of file DDG.cpp.
References N, and llvm::DirectedGraph< NodeType, EdgeType >::Nodes.
Add node N
to the graph, if it's not added yet, and keep track of the root node as well as pi-blocks and their members.
Return true if node is successfully added.
Definition at line 220 of file DDG.cpp.
References llvm::DirectedGraph< NodeType, EdgeType >::addNode(), assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), N, and llvm::DependenceGraphInfo< NodeType >::Root.
Referenced by llvm::DDGBuilder::createFineGrainedNode(), llvm::DDGBuilder::createPiBlock(), and llvm::DDGBuilder::createRootNode().
const PiBlockDDGNode * DataDependenceGraph::getPiBlock | ( | const NodeType & | N | ) | const |
If node N
belongs to a pi-block return a pointer to the pi-block, otherwise return null.
Definition at line 243 of file DDG.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and N.
Referenced by llvm::DOTGraphTraits< const DataDependenceGraph * >::isNodeHidden().
|
friend |
Definition at line 308 of file DDG.h.
Referenced by DataDependenceGraph().