23#ifndef TVM_S_TIR_STMT_FUNCTOR_H_
24#define TVM_S_TIR_STMT_FUNCTOR_H_
36template <
typename FType>
39template <
typename R,
typename... Args>
45 using Parent::Dispatch_;
48 return this->DispatchDefault_(op, std::forward<Args>(args)...);
51 return this->DispatchDefault_(op, std::forward<Args>(args)...);
58 Parent::InitVTable(vtable);
59 Parent::template SetDispatch<StmtFunctor, SBlockNode>(vtable);
60 Parent::template SetDispatch<StmtFunctor, SBlockRealizeNode>(vtable);
79 using tirx::StmtExprVisitor::Visit;
80 using tirx::StmtExprVisitor::Visit_;
109 using tirx::StmtExprMutator::Mutate;
110 using tirx::StmtExprMutator::Mutate_;
117 InplaceMode inplace_mode);
120 InplaceMode inplace_mode);
A dynamically dispatched functor on the type of the first argument.
Definition object_functor.h:85
Container of all statements.
Definition stmt.h:62
A block is a basic schedule unit in TIR.
Definition stmt.h:112
A block realization node represents execution of the block at the binding values.
Definition stmt.h:188
Extend native TIRX mutation while preserving block iterator binders.
Definition stmt_functor.h:106
static UnchangedOr< Stmt > MutateBlockRealize(tirx::StmtExprMutator *mutator, const SBlockRealizeNode *op, InplaceMode inplace_mode)
static UnchangedOr< Stmt > MutateBlock(tirx::StmtExprMutator *mutator, const SBlockNode *op, InplaceMode inplace_mode)
static void InitVTable(VTable *vtable)
StmtExprMutator(const VTable *vtable)
Definition stmt_functor.h:123
virtual UnchangedOr< Stmt > Mutate_(const SBlockNode *op, InplaceMode inplace_mode)
virtual UnchangedOr< Stmt > Mutate_(const SBlockRealizeNode *op, InplaceMode inplace_mode)
Extend native TIRX traversal with schedulable block semantics.
Definition stmt_functor.h:76
static ffi::Optional< VisitInterrupt > VisitBlock(tirx::StmtExprVisitor *visitor, const SBlockNode *op)
StmtExprVisitor(const VTable *vtable)
Definition stmt_functor.h:92
static ffi::Optional< VisitInterrupt > VisitBlockRealize(tirx::StmtExprVisitor *visitor, const SBlockRealizeNode *op)
virtual ffi::Optional< VisitInterrupt > Visit_(const SBlockNode *op)
virtual ffi::Optional< VisitInterrupt > Visit_(const SBlockRealizeNode *op)
static void InitVTable(VTable *vtable)
typename Parent::VTable VTable
Definition stmt_functor.h:55
virtual R Dispatch_(const SBlockRealizeNode *op, Args... args)
Definition stmt_functor.h:50
virtual R Dispatch_(const SBlockNode *op, Args... args)
Definition stmt_functor.h:47
StmtFunctor(const VTable *vtable)
Definition stmt_functor.h:56
static void InitVTable(VTable *vtable)
Definition stmt_functor.h:57
Extend TIRX statement dispatch with schedulable blocks.
Definition stmt_functor.h:37
Mutator that recursively mutates stmts and exprs on them.
Definition stmt_functor.h:221
Native visitor for TIRx statements and their expression operands.
Definition stmt_functor.h:176
Definition stmt_functor.h:54
Type-dispatched statement functor with a caller-selected signature.
Definition stmt_functor.h:51
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
#define TVM_DEFINE_OBJECT_FUNCTOR_DEFAULT_CONSTRUCTOR(Class, Parent)
Define a default constructor backed by one initialized native dispatch table.
Definition object_functor.h:529
S-TIR (Schedulable TIR) statements and attributes.
Functors for tirx stmts utility functions to call common functors.