|
CGRAOmp
0.1
|
A graph class for CGRA kernel DFG derived from llvm::DirectedGraph. More...
#include <CGRADataFlowGraph.hpp>
Public Types | |
| using | NodeType = DFGNode |
| using | EdgeType = DFGEdge |
| using | EdgeInfoType = std::pair< NodeType *, EdgeListTy > |
Public Member Functions | |
| CGRADFG ()=delete | |
| CGRADFG (Function *F, Loop *L) | |
| Constructor. More... | |
| CGRADFG (const CGRADFG &G)=delete | |
| CGRADFG (CGRADFG &&G) | |
| move constructor More... | |
| CGRADFG (NodeType &N) | |
| constructor with an initial node More... | |
| ~CGRADFG () | |
| Destructor. More... | |
| NodeType & | getRoot () const |
| Get the virtual route node object. More... | |
| NodeType * | addNode (NodeType &N) |
| add a new node to the graph More... | |
| bool | connect (NodeType &Src, NodeType &Dst, EdgeType &E) |
| connect two nodes with an edge More... | |
| bool | findIncomingEdgesToNode (const NodeType &N, SmallVectorImpl< EdgeInfoType > &EL, bool ignore_vroot=false) const |
| find in-coming edges and get the list of them Unlike the same name method in llvm::DirectedGraph, this keeps source nodes of the egdges. If you want to ignore the virtual root, set ignore vroot to be true More... | |
| bool | hasExtraInfo () const |
| string | convertToReadableNodeName (const string dot_string) const |
| convert "Node_" + pointer style node name to more plain name More... | |
| Error | saveAsDotGraph (StringRef filepath) |
| save the graph as DOT file More... | |
| Error | saveExtraInfo (StringRef filepath) |
| void | setName (const string graph_name) |
| Set the Name object. More... | |
| string | getName () const |
| Get the Name object. More... | |
| void | makeSequentialNodeID () |
| Function * | getFunction () |
| Loop * | getLoop () |
Private Member Functions | |
| void | createVirtualRoot () |
Private Attributes | |
| NodeType * | virtual_root = nullptr |
| string | name = "" |
| Function * | F |
| Loop * | L |
A graph class for CGRA kernel DFG derived from llvm::DirectedGraph.
To handle this graph class by LLVM utilities (such as traversal), it needs an entry node. However, data-flow-graphs have more than one nodes which has no in-coming edge. Therefore, this class has a virtual root node, which is connected to those node and does not correspond to any LLVM IR values. When exporting this graph instance as DOT file, the virtual root and its edges are eliminated.
| using llvm::CGRADFG::EdgeInfoType = std::pair<NodeType*, EdgeListTy> |
| using llvm::CGRADFG::EdgeType = DFGEdge |
| using llvm::CGRADFG::NodeType = DFGNode |
|
delete |
|
inline |
Constructor.
| F | Function includes the kernel of DFG |
| L | Loop corresponding to the kernel of DFG |
|
delete |
|
inline |
move constructor
|
inline |
constructor with an initial node
|
inline |
Destructor.
| CGRADFG::NodeType * CGRADFG::addNode | ( | NodeType & | N | ) |
add a new node to the graph
| N | a DFG node to be added |
connect two nodes with an edge
| Src | source node |
| Dst | destination node |
| E | an edge pointing to the dest. node |
| string llvm::CGRADFG::convertToReadableNodeName | ( | const string | dot_string | ) | const |
convert "Node_" + pointer style node name to more plain name
| dot_string | contents of the DOT file |
|
inlineprivate |
|
inline |
find in-coming edges and get the list of them Unlike the same name method in llvm::DirectedGraph, this keeps source nodes of the egdges. If you want to ignore the virtual root, set ignore vroot to be true
| N | Node |
| EL | a list of edge infomation (edges + src node) |
| ignore_vroot | whether the virtual root is ignored or not (Default: false) |
|
inline |
|
inline |
|
inline |
Get the Name object.
|
inline |
Get the virtual route node object.
|
inline |
| void CGRADFG::makeSequentialNodeID | ( | ) |
| Error CGRADFG::saveAsDotGraph | ( | StringRef | filepath | ) |
save the graph as DOT file
| filepath | filepath of the save file |
If OptDFGPlainNodeName option is enabled, this method calls convertToReadableNodeName. Then, the converted contents is saved as a file.
| Error CGRADFG::saveExtraInfo | ( | StringRef | filepath | ) |
|
inline |
Set the Name object.
| graph_name | name of the graph |
|
private |
|
private |
|
private |
|
private |
1.8.17