|
LLZK 0.1.0
Veridise's ZK Language IR
|
Builds a graph structure representing the relationships between symbols and their uses. More...
#include <SymbolUseGraph.h>
Public Types | |
| using | roots_iterator = SymbolUseGraphNode::iterator |
| Iterator over the root nodes (i.e., nodes that have no predecessors). | |
| using | iterator = NodeIterator |
| An iterator over the nodes of the graph. | |
Public Member Functions | |
| SymbolUseGraph (mlir::SymbolOpInterface rootSymbolOp) | |
| const SymbolUseGraphNode * | lookupNode (mlir::ModuleOp pathRoot, mlir::SymbolRefAttr path) const |
| Return the existing node for the symbol reference relative to the given module, else nullptr. | |
| const SymbolUseGraphNode * | lookupNode (mlir::SymbolOpInterface symbolDef) const |
| Return the existing node for the symbol definition op, else nullptr. | |
| size_t | size () const |
| Return the total number of nodes in the graph. | |
| roots_iterator | roots_begin () const |
| roots_iterator | roots_end () const |
| llvm::iterator_range< roots_iterator > | rootsIter () const |
| Range over root nodes (i.e., nodes that have no predecessors). | |
| iterator | begin () const |
| iterator | end () const |
| llvm::iterator_range< iterator > | nodesIter () const |
| Range over all nodes in the graph. | |
| void | dump () const |
| Dump the graph in a human readable format. | |
| void | print (llvm::raw_ostream &os) const |
| void | dumpToDotFile (std::string filename="") const |
| Dump the graph to file in dot graph format. | |
Friends | |
| struct | llvm::GraphTraits< const llzk::SymbolUseGraph * > |
| struct | llvm::GraphTraits< llvm::Inverse< const llzk::SymbolUseGraph * > > |
Builds a graph structure representing the relationships between symbols and their uses.
There is a node for each SymbolRef and the successors are the Symbols uses within this Symbol's defining Operation.
Definition at line 123 of file SymbolUseGraph.h.
| using llzk::SymbolUseGraph::iterator = NodeIterator |
An iterator over the nodes of the graph.
Definition at line 193 of file SymbolUseGraph.h.
Iterator over the root nodes (i.e., nodes that have no predecessors).
Definition at line 183 of file SymbolUseGraph.h.
| llzk::SymbolUseGraph::SymbolUseGraph | ( | mlir::SymbolOpInterface | rootSymbolOp | ) |
Definition at line 86 of file SymbolUseGraph.cpp.
|
inline |
Definition at line 194 of file SymbolUseGraph.h.
|
inline |
Dump the graph in a human readable format.
Definition at line 203 of file SymbolUseGraph.h.
| void llzk::SymbolUseGraph::dumpToDotFile | ( | std::string | filename = "" | ) | const |
Dump the graph to file in dot graph format.
Definition at line 280 of file SymbolUseGraph.cpp.
|
inline |
Definition at line 195 of file SymbolUseGraph.h.
| const SymbolUseGraphNode * llzk::SymbolUseGraph::lookupNode | ( | mlir::ModuleOp | pathRoot, |
| mlir::SymbolRefAttr | path ) const |
Return the existing node for the symbol reference relative to the given module, else nullptr.
| const SymbolUseGraphNode * llzk::SymbolUseGraph::lookupNode | ( | mlir::SymbolOpInterface | symbolDef | ) | const |
Return the existing node for the symbol definition op, else nullptr.
|
inline |
Range over all nodes in the graph.
Definition at line 198 of file SymbolUseGraph.h.
| void llzk::SymbolUseGraph::print | ( | llvm::raw_ostream & | os | ) | const |
Definition at line 239 of file SymbolUseGraph.cpp.
|
inline |
Definition at line 184 of file SymbolUseGraph.h.
|
inline |
Definition at line 185 of file SymbolUseGraph.h.
|
inline |
Range over root nodes (i.e., nodes that have no predecessors).
Definition at line 188 of file SymbolUseGraph.h.
|
inline |
Return the total number of nodes in the graph.
Definition at line 180 of file SymbolUseGraph.h.
|
friend |
Definition at line 164 of file SymbolUseGraph.h.
|
friend |
Definition at line 164 of file SymbolUseGraph.h.