LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
llzk::SymbolDefTree Class Reference

Builds a tree structure representing the symbol table structure. More...

#include <SymbolDefTree.h>

Public Types

using iterator = NodeIterator
 An iterator over the nodes of the tree.
 

Public Member Functions

 SymbolDefTree (mlir::SymbolOpInterface root)
 
const SymbolDefTreeNodelookupNode (mlir::SymbolOpInterface symbolOp) const
 Lookup the node for the given symbol Op, or nullptr if none exists.
 
const SymbolDefTreeNodegetRoot () const
 Returns the symbolic (i.e., no associated op) root node of the tree.
 
size_t size () const
 Return total number of nodes in the tree.
 
iterator begin () const
 
iterator end () const
 
llvm::iterator_range< iteratornodeIter () const
 
void dump () const
 Dump the tree in a human readable format.
 
void print (llvm::raw_ostream &os) const
 
void dumpToDotFile (std::string filename="") const
 Dump the tree to file in dot graph format.
 

Detailed Description

Builds a tree structure representing the symbol table structure.

There is a node for each Symbol Operation and the parent is the SymbolTable that defines the Symbol.

Definition at line 71 of file SymbolDefTree.h.

Member Typedef Documentation

◆ iterator

using llzk::SymbolDefTree::iterator = NodeIterator

An iterator over the nodes of the tree.

Definition at line 117 of file SymbolDefTree.h.

Constructor & Destructor Documentation

◆ SymbolDefTree()

llzk::SymbolDefTree::SymbolDefTree ( mlir::SymbolOpInterface root)

Definition at line 55 of file SymbolDefTree.cpp.

Member Function Documentation

◆ begin()

iterator llzk::SymbolDefTree::begin ( ) const
inline

Definition at line 118 of file SymbolDefTree.h.

◆ dump()

void llzk::SymbolDefTree::dump ( ) const
inline

Dump the tree in a human readable format.

Definition at line 126 of file SymbolDefTree.h.

◆ dumpToDotFile()

void llzk::SymbolDefTree::dumpToDotFile ( std::string filename = "") const

Dump the tree to file in dot graph format.

Definition at line 131 of file SymbolDefTree.cpp.

◆ end()

iterator llzk::SymbolDefTree::end ( ) const
inline

Definition at line 119 of file SymbolDefTree.h.

◆ getRoot()

const SymbolDefTreeNode * llzk::SymbolDefTree::getRoot ( ) const
inline

Returns the symbolic (i.e., no associated op) root node of the tree.

Definition at line 111 of file SymbolDefTree.h.

◆ lookupNode()

const SymbolDefTreeNode * llzk::SymbolDefTree::lookupNode ( mlir::SymbolOpInterface symbolOp) const

Lookup the node for the given symbol Op, or nullptr if none exists.

Definition at line 89 of file SymbolDefTree.cpp.

◆ nodeIter()

llvm::iterator_range< iterator > llzk::SymbolDefTree::nodeIter ( ) const
inline

Definition at line 121 of file SymbolDefTree.h.

◆ print()

void llzk::SymbolDefTree::print ( llvm::raw_ostream & os) const

Definition at line 109 of file SymbolDefTree.cpp.

◆ size()

size_t llzk::SymbolDefTree::size ( ) const
inline

Return total number of nodes in the tree.

Definition at line 114 of file SymbolDefTree.h.


The documentation for this class was generated from the following files: