Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Halide::Internal::IRGraphMutator Class Reference

A mutator that caches and reapplies previously done mutations so that it can handle graphs of IR that have not had CSE done to them. More...

`#include <IRMutator.h>`

Inheritance diagram for Halide::Internal::IRGraphMutator:

## Public Member Functions
Stmt | mutate (const Stmt &s) override
Expr | mutate (const Expr &e) override
| This is the main interface for using a mutator.
virtual Expr | mutate (const Expr &expr)
| This is the main interface for using a mutator.
virtual Stmt | mutate (const Stmt &stmt)
std::vector< Expr > | mutate (const std::vector< Expr > &exprs)
Public Member Functions inherited from Halide::Internal::IRMutator
| IRMutator ()=default
virtual | ~IRMutator ()=default
std::pair< std::vector< Expr >, bool > | mutate_with_changes (const std::vector< Expr > &)
std::vector< Expr > | mutate (const std::vector< Expr > &exprs)

## Protected Attributes
std::map< Expr, Expr, ExprCompare > | expr_replacements
std::map< Stmt, Stmt, Stmt::Compare > | stmt_replacements

## Additional Inherited Members
Protected Member Functions inherited from Halide::Internal::IRMutator
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 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 Let *)
virtual Stmt | visit (const LetStmt *)
virtual Stmt | visit (const AssertStmt *)
virtual Stmt | visit (const ProducerConsumer *)
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 Fork *)
virtual Stmt | visit (const IfThenElse *)
virtual Stmt | visit (const Evaluate *)
virtual Expr | visit (const Call *)
virtual Expr | visit (const Variable *)
virtual Stmt | visit (const For *)
virtual Stmt | visit (const Acquire *)
virtual Expr | visit (const Shuffle *)
virtual Stmt | visit (const Prefetch *)
virtual Stmt | visit (const HoistedStorage *)
virtual Stmt | visit (const Atomic *)
virtual Expr | visit (const VectorReduce *)

## Detailed Description

A mutator that caches and reapplies previously done mutations so that it can handle graphs of IR that have not had CSE done to them.

Definition at line 109 of file IRMutator.h.

## Member Function Documentation

## ◆ mutate() [1/5]

Stmt Halide::Internal::IRGraphMutator::mutate | ( | const Stmt & | s | ) |
| override virtual

Reimplemented from Halide::Internal::IRMutator.

## ◆ mutate() [2/5]

Expr Halide::Internal::IRGraphMutator::mutate | ( | const Expr & | expr | ) |
| override virtual

This is the main interface for using a mutator.

Also call these in your subclass to mutate sub-expressions and sub-statements.

Reimplemented from Halide::Internal::IRMutator.

## ◆ mutate() [3/5]

virtual Expr Halide::Internal::IRMutator::mutate | ( | const Expr & | expr | ) |
| virtual

This is the main interface for using a mutator.

Also call these in your subclass to mutate sub-expressions and sub-statements.

Reimplemented from Halide::Internal::IRMutator.

## ◆ mutate() [4/5]

virtual Stmt Halide::Internal::IRMutator::mutate | ( | const Stmt & | stmt | ) |
| virtual

Reimplemented from Halide::Internal::IRMutator.

## ◆ mutate() [5/5]

std::vector< Expr > Halide::Internal::IRMutator::mutate | ( | const std::vector< Expr > & | exprs | ) |
| inline

Definition at line 45 of file IRMutator.h.

## Member Data Documentation

## ◆ expr_replacements

std::map<Expr, Expr, ExprCompare> Halide::Internal::IRGraphMutator::expr_replacements
| protected

Definition at line 111 of file IRMutator.h.

## ◆ stmt_replacements

std::map<Stmt, Stmt, Stmt::Compare> Halide::Internal::IRGraphMutator::stmt_replacements
| protected

Definition at line 112 of file IRMutator.h.

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

- src/IRMutator.h