LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
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 SymbolDefTreeNode * lookupNode (mlir::SymbolOpInterface symbolOp) const
 Lookup the node for the given symbol Op, or nullptr if none exists.
const SymbolDefTreeNode * getRoot () 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< iterator > nodeIter () 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 58 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 134 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 92 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 112 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: