|
Halide 22.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) |
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 28 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, Halide::Internal::LambdaMutatorGeneric< Lambdas >, and Halide::Internal::IRGraphMutator.
Referenced by Halide::Internal::LambdaMutatorGeneric< Lambdas >::mutate_base().
| std::pair< std::vector< Expr >, bool > Halide::Internal::IRMutator::mutate_with_changes | ( | const std::vector< Expr > & | ) |
Referenced by mutate().
Definition at line 45 of file IRMutator.h.
References mutate_with_changes().
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Referenced by Halide::SimdOpCheckTest::check_one(), and Halide::Internal::LambdaMutator< Lambdas >::visit_base().
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
|
protectedvirtual |
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
|
protectedvirtual |
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
|
protectedvirtual |
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
|
protectedvirtual |
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
|
protectedvirtual |
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.
|
protectedvirtual |
Reimplemented in Halide::Internal::LambdaMutator< Lambdas >.