tvm
Protected Member Functions | List of all members
tvm::tir::StmtExprMutator Class Reference

Mutator that recursively mutates stmts and exprs on them. More...

#include <stmt_functor.h>

Inheritance diagram for tvm::tir::StmtExprMutator:
Collaboration diagram for tvm::tir::StmtExprMutator:

Protected Member Functions

PrimExpr VisitExpr (const PrimExpr &e) override
 Visitor to Exprs, can be overriden to do recursive changes to Exprs. More...
 
virtual PrimExpr VisitExpr (const PrimExpr &e)
 Visitor to Exprs, can be overriden to do recursive changes to Exprs. More...
 
- Protected Member Functions inherited from tvm::tir::StmtMutator
template<typename TNode >
ObjectPtr< TNode > CopyOnWrite (const TNode *node)
 Perform copy on write on node. More...
 
Stmt VisitStmt (const Stmt &stmt) override
 Internal mutator that everyone calls. More...
 
Stmt VisitStmt_ (const AttrStmtNode *op) override
 
Stmt VisitStmt_ (const IfThenElseNode *op) override
 
Stmt VisitStmt_ (const LetStmtNode *op) override
 
Stmt VisitStmt_ (const ForNode *op) override
 
Stmt VisitStmt_ (const WhileNode *op) override
 
Stmt VisitStmt_ (const AllocateNode *op) override
 
Stmt VisitStmt_ (const AllocateConstNode *op) override
 
Stmt VisitStmt_ (const DeclBufferNode *op) override
 
Stmt VisitStmt_ (const BufferStoreNode *op) override
 
Stmt VisitStmt_ (const BufferRealizeNode *op) override
 
Stmt VisitStmt_ (const AssertStmtNode *op) override
 
Stmt VisitStmt_ (const ProducerStoreNode *op) override
 
Stmt VisitStmt_ (const ProducerRealizeNode *op) override
 
Stmt VisitStmt_ (const PrefetchNode *op) override
 
Stmt VisitStmt_ (const SeqStmtNode *op) override
 
Stmt VisitStmt_ (const EvaluateNode *op) override
 
Stmt VisitStmt_ (const BlockNode *op) override
 
Stmt VisitStmt_ (const BlockRealizeNode *op) override
 
Stmt VisitSeqStmt_ (const SeqStmtNode *op, bool flatten_before_visit, std::function< Stmt(const Stmt &)> fmutate=nullptr)
 Alternative advance method for SeqStmtNode. More...
 
- Protected Member Functions inherited from tvm::tir::ExprMutator
PrimExpr VisitExpr_ (const VarNode *op) override
 
PrimExpr VisitExpr_ (const SizeVarNode *op) override
 
PrimExpr VisitExpr_ (const BufferLoadNode *op) override
 
PrimExpr VisitExpr_ (const ProducerLoadNode *op) override
 
PrimExpr VisitExpr_ (const LetNode *op) override
 
PrimExpr VisitExpr_ (const CallNode *op) override
 
PrimExpr VisitExpr_ (const AddNode *op) override
 
PrimExpr VisitExpr_ (const SubNode *op) override
 
PrimExpr VisitExpr_ (const MulNode *op) override
 
PrimExpr VisitExpr_ (const DivNode *op) override
 
PrimExpr VisitExpr_ (const ModNode *op) override
 
PrimExpr VisitExpr_ (const FloorDivNode *op) override
 
PrimExpr VisitExpr_ (const FloorModNode *op) override
 
PrimExpr VisitExpr_ (const MinNode *op) override
 
PrimExpr VisitExpr_ (const MaxNode *op) override
 
PrimExpr VisitExpr_ (const EQNode *op) override
 
PrimExpr VisitExpr_ (const NENode *op) override
 
PrimExpr VisitExpr_ (const LTNode *op) override
 
PrimExpr VisitExpr_ (const LENode *op) override
 
PrimExpr VisitExpr_ (const GTNode *op) override
 
PrimExpr VisitExpr_ (const GENode *op) override
 
PrimExpr VisitExpr_ (const AndNode *op) override
 
PrimExpr VisitExpr_ (const OrNode *op) override
 
PrimExpr VisitExpr_ (const ReduceNode *op) override
 
PrimExpr VisitExpr_ (const CastNode *op) override
 
PrimExpr VisitExpr_ (const NotNode *op) override
 
PrimExpr VisitExpr_ (const SelectNode *op) override
 
PrimExpr VisitExpr_ (const RampNode *op) override
 
PrimExpr VisitExpr_ (const BroadcastNode *op) override
 
PrimExpr VisitExpr_ (const ShuffleNode *op) override
 
PrimExpr VisitExpr_ (const IntImmNode *op) override
 
PrimExpr VisitExpr_ (const FloatImmNode *op) override
 
PrimExpr VisitExpr_ (const StringImmNode *op) override
 
PrimExpr VisitExpr_ (const AnyNode *op) override
 

Additional Inherited Members

- Public Member Functions inherited from tvm::tir::StmtMutator
Stmt operator() (Stmt stmt)
 Mutate stmt. More...
 
- Protected Attributes inherited from tvm::tir::StmtMutator
bool allow_copy_on_write_ {false}
 Internal state to indicate whether copy on write is enabled. COW is enabled iff all the parents of the node are unique. More...
 

Detailed Description

Mutator that recursively mutates stmts and exprs on them.

Member Function Documentation

◆ VisitExpr() [1/2]

virtual PrimExpr tvm::tir::StmtMutator::VisitExpr
inlineprotected

Visitor to Exprs, can be overriden to do recursive changes to Exprs.

Note
A common pattern is to call ExprMutator here, or have a class sub-class both StmtMutator and ExprMutator and redirect Mutate to ExprMutator::Mutate(Expr)

◆ VisitExpr() [2/2]

PrimExpr tvm::tir::StmtExprMutator::VisitExpr ( const PrimExpr e)
inlineoverrideprotectedvirtual

Visitor to Exprs, can be overriden to do recursive changes to Exprs.

Note
A common pattern is to call ExprMutator here, or have a class sub-class both StmtMutator and ExprMutator and redirect Mutate to ExprMutator::Mutate(Expr)

Reimplemented from tvm::tir::StmtMutator.


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