Halide 19.0.0
Halide compiler and libraries
|
A base class for passes over the IR which modify it (e.g. More...
#include <IRMutator.h>
Public Member Functions | |
IRMutator ()=default | |
virtual | ~IRMutator ()=default |
virtual Expr | mutate (const Expr &expr) |
This is the main interface for using a mutator. | |
virtual Stmt | mutate (const Stmt &stmt) |
std::pair< std::vector< Expr >, bool > | mutate_with_changes (const std::vector< Expr > &) |
std::vector< Expr > | mutate (const std::vector< Expr > &exprs) |
Protected Member Functions | |
virtual Expr | visit (const IntImm *) |
virtual Expr | visit (const UIntImm *) |
virtual Expr | visit (const FloatImm *) |
virtual Expr | visit (const StringImm *) |
virtual Expr | visit (const Cast *) |
virtual Expr | visit (const Reinterpret *) |
virtual Expr | visit (const Variable *) |
virtual Expr | visit (const Add *) |
virtual Expr | visit (const Sub *) |
virtual Expr | visit (const Mul *) |
virtual Expr | visit (const Div *) |
virtual Expr | visit (const Mod *) |
virtual Expr | visit (const Min *) |
virtual Expr | visit (const Max *) |
virtual Expr | visit (const EQ *) |
virtual Expr | visit (const NE *) |
virtual Expr | visit (const LT *) |
virtual Expr | visit (const LE *) |
virtual Expr | visit (const GT *) |
virtual Expr | visit (const GE *) |
virtual Expr | visit (const And *) |
virtual Expr | visit (const Or *) |
virtual Expr | visit (const Not *) |
virtual Expr | visit (const Select *) |
virtual Expr | visit (const Load *) |
virtual Expr | visit (const Ramp *) |
virtual Expr | visit (const Broadcast *) |
virtual Expr | visit (const Call *) |
virtual Expr | visit (const Let *) |
virtual Expr | visit (const Shuffle *) |
virtual Expr | visit (const VectorReduce *) |
virtual Stmt | visit (const LetStmt *) |
virtual Stmt | visit (const AssertStmt *) |
virtual Stmt | visit (const ProducerConsumer *) |
virtual Stmt | visit (const For *) |
virtual Stmt | visit (const Store *) |
virtual Stmt | visit (const Provide *) |
virtual Stmt | visit (const Allocate *) |
virtual Stmt | visit (const Free *) |
virtual Stmt | visit (const Realize *) |
virtual Stmt | visit (const Block *) |
virtual Stmt | visit (const IfThenElse *) |
virtual Stmt | visit (const Evaluate *) |
virtual Stmt | visit (const Prefetch *) |
virtual Stmt | visit (const Acquire *) |
virtual Stmt | visit (const Fork *) |
virtual Stmt | visit (const Atomic *) |
virtual Stmt | visit (const HoistedStorage *) |
A base class for passes over the IR which modify it (e.g.
replacing a variable with a value (Substitute.h), or constant-folding).
Your mutator should override the visit() methods you care about and return the new expression or stmt. The default implementations recursively mutate their children. To mutate sub-expressions and sub-statements you should override the mutate() method, which will dispatch to the appropriate visit() method and then return the value of expr or stmt after the call to visit.
Definition at line 26 of file IRMutator.h.
|
default |
|
virtualdefault |
This is the main interface for using a mutator.
Also call these in your subclass to mutate sub-expressions and sub-statements.
Reimplemented in Halide::Internal::IRGraphMutator.
Referenced by Halide::Internal::IRGraphMutator::mutate().
Reimplemented in Halide::Internal::IRGraphMutator.
std::pair< std::vector< Expr >, bool > Halide::Internal::IRMutator::mutate_with_changes | ( | const std::vector< Expr > & | ) |
Referenced by mutate().
Definition at line 43 of file IRMutator.h.
References mutate_with_changes().
Referenced by Halide::SimdOpCheckTest::check_one().
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |