tvm
Public Member Functions | Protected Attributes | List of all members
tvm::relay::ExprVisitor Class Reference

A simple visitor wrapper around ExprFunctor. Recursively visit the content. More...

#include <expr_functor.h>

Inheritance diagram for tvm::relay::ExprVisitor:
Collaboration diagram for tvm::relay::ExprVisitor:

Public Member Functions

void VisitExpr (const Expr &expr) override
 
void VisitExpr_ (const VarNode *op) override
 
void VisitExpr_ (const GlobalVarNode *op) override
 
void VisitExpr_ (const ConstantNode *op) override
 
void VisitExpr_ (const TupleNode *op) override
 
void VisitExpr_ (const FunctionNode *op) override
 
void VisitExpr_ (const CallNode *op) override
 
void VisitExpr_ (const LetNode *op) override
 
void VisitExpr_ (const IfNode *op) override
 
void VisitExpr_ (const OpNode *op) override
 
void VisitExpr_ (const TupleGetItemNode *op) override
 
void VisitExpr_ (const RefCreateNode *op) override
 
void VisitExpr_ (const RefReadNode *op) override
 
void VisitExpr_ (const RefWriteNode *op) override
 
void VisitExpr_ (const ConstructorNode *op) override
 
void VisitExpr_ (const MatchNode *op) override
 
virtual void VisitType (const Type &t)
 
virtual void VisitClause (const Clause &c)
 
virtual void VisitPattern (const Pattern &c)
 
virtual void VisitSpan (const Span &span)
 

Protected Attributes

std::unordered_map< const Object *, size_t > visit_counter_
 

Detailed Description

A simple visitor wrapper around ExprFunctor. Recursively visit the content.

ExprVisitor treats Expr as dataflow graph, and only visit each Expr node once.

Member Function Documentation

◆ VisitClause()

virtual void tvm::relay::ExprVisitor::VisitClause ( const Clause c)
virtual

◆ VisitExpr()

void tvm::relay::ExprVisitor::VisitExpr ( const Expr expr)
override

◆ VisitExpr_() [1/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const CallNode op)
override

◆ VisitExpr_() [2/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const ConstantNode op)
override

◆ VisitExpr_() [3/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const ConstructorNode op)
override

◆ VisitExpr_() [4/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const FunctionNode op)
override

◆ VisitExpr_() [5/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const GlobalVarNode op)
override

◆ VisitExpr_() [6/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const IfNode op)
override

◆ VisitExpr_() [7/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const LetNode op)
override

◆ VisitExpr_() [8/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const MatchNode op)
override

◆ VisitExpr_() [9/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const OpNode op)
override

◆ VisitExpr_() [10/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const RefCreateNode op)
override

◆ VisitExpr_() [11/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const RefReadNode op)
override

◆ VisitExpr_() [12/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const RefWriteNode op)
override

◆ VisitExpr_() [13/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const TupleGetItemNode op)
override

◆ VisitExpr_() [14/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const TupleNode op)
override

◆ VisitExpr_() [15/15]

void tvm::relay::ExprVisitor::VisitExpr_ ( const VarNode op)
override

◆ VisitPattern()

virtual void tvm::relay::ExprVisitor::VisitPattern ( const Pattern c)
virtual

◆ VisitSpan()

virtual void tvm::relay::ExprVisitor::VisitSpan ( const Span span)
virtual

◆ VisitType()

virtual void tvm::relay::ExprVisitor::VisitType ( const Type t)
virtual

Member Data Documentation

◆ visit_counter_

std::unordered_map<const Object*, size_t> tvm::relay::ExprVisitor::visit_counter_
protected

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