Halide 22.0.0 Halide compiler and libraries

Protected Member Functions | List of all members
Halide::Internal::IRGraphVisitor Class Reference

A base class for algorithms that walk recursively over the IR without visiting the same node twice. More...

`#include <IRVisitor.h>`

Inheritance diagram for Halide::Internal::IRGraphVisitor:

## Protected Member Functions
virtual void | include (const Expr &)
| By default these methods add the node to the visited set, and return whether or not it was already there. More...
virtual void | include (const Stmt &)
void | visit (const IntImm *) override
| These methods should call 'include' on the children to only visit them if they haven't been visited already. More...
void | visit (const UIntImm *) override
void | visit (const FloatImm *) override
void | visit (const StringImm *) override
void | visit (const Cast *) override
void | visit (const Reinterpret *) override
void | visit (const Variable *) override
void | visit (const Add *) override
void | visit (const Sub *) override
void | visit (const Mul *) override
void | visit (const Div *) override
void | visit (const Mod *) override
void | visit (const Min *) override
void | visit (const Max *) override
void | visit (const EQ *) override
void | visit (const NE *) override
void | visit (const LT *) override
void | visit (const LE *) override
void | visit (const GT *) override
void | visit (const GE *) override
void | visit (const And *) override
void | visit (const Or *) override
void | visit (const Not *) override
void | visit (const Select *) override
void | visit (const Load *) override
void | visit (const Ramp *) override
void | visit (const Broadcast *) override
void | visit (const Call *) override
void | visit (const Let *) override
void | visit (const LetStmt *) override
void | visit (const AssertStmt *) override
void | visit (const ProducerConsumer *) override
void | visit (const For *) override
void | visit (const Store *) override
void | visit (const Provide *) override
void | visit (const Allocate *) override
void | visit (const Free *) override
void | visit (const Realize *) override
void | visit (const Block *) override
void | visit (const IfThenElse *) override
void | visit (const Evaluate *) override
void | visit (const Shuffle *) override
void | visit (const VectorReduce *) override
void | visit (const Prefetch *) override
void | visit (const Acquire *) override
void | visit (const Fork *) override
void | visit (const Atomic *) override
void | visit (const HoistedStorage *) override
virtual void | visit (const IntImm *)
virtual void | visit (const UIntImm *)
virtual void | visit (const FloatImm *)
virtual void | visit (const StringImm *)
virtual void | visit (const Cast *)
virtual void | visit (const Reinterpret *)
virtual void | visit (const Variable *)
virtual void | visit (const Add *)
virtual void | visit (const Sub *)
virtual void | visit (const Mul *)
virtual void | visit (const Div *)
virtual void | visit (const Mod *)
virtual void | visit (const Min *)
virtual void | visit (const Max *)
virtual void | visit (const EQ *)
virtual void | visit (const NE *)
virtual void | visit (const LT *)
virtual void | visit (const LE *)
virtual void | visit (const GT *)
virtual void | visit (const GE *)
virtual void | visit (const And *)
virtual void | visit (const Or *)
virtual void | visit (const Not *)
virtual void | visit (const Select *)
virtual void | visit (const Load *)
virtual void | visit (const Ramp *)
virtual void | visit (const Broadcast *)
virtual void | visit (const Call *)
virtual void | visit (const Let *)
virtual void | visit (const LetStmt *)
virtual void | visit (const AssertStmt *)
virtual void | visit (const ProducerConsumer *)
virtual void | visit (const For *)
virtual void | visit (const Store *)
virtual void | visit (const Provide *)
virtual void | visit (const Allocate *)
virtual void | visit (const Free *)
virtual void | visit (const Realize *)
virtual void | visit (const Block *)
virtual void | visit (const IfThenElse *)
virtual void | visit (const Evaluate *)
virtual void | visit (const Shuffle *)
virtual void | visit (const VectorReduce *)
virtual void | visit (const Prefetch *)
virtual void | visit (const Fork *)
virtual void | visit (const Acquire *)
virtual void | visit (const Atomic *)
virtual void | visit (const HoistedStorage *)

## Additional Inherited Members
Public Member Functions inherited from Halide::Internal::IRVisitor
| IRVisitor ()=default
virtual | ~IRVisitor ()=default

## Detailed Description

A base class for algorithms that walk recursively over the IR without visiting the same node twice.

This is for passes that are capable of interpreting the IR as a DAG instead of a tree.

Definition at line 85 of file IRVisitor.h.

## Member Function Documentation

## ◆ include() [1/2]

virtual void Halide::Internal::IRGraphVisitor::include | ( | const Expr & |  | ) |
| protected virtual

By default these methods add the node to the visited set, and return whether or not it was already there.

If it wasn't there, it delegates to the appropriate visit method. You can override them if you like.

## ◆ include() [2/2]

virtual void Halide::Internal::IRGraphVisitor::include | ( | const Stmt & |  | ) |
| protected virtual

## ◆ visit() [1/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const IntImm * |  | ) |
| override protected virtual

These methods should call 'include' on the children to only visit them if they haven't been visited already.

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [2/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const UIntImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [3/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const FloatImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [4/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const StringImm * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [5/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Cast * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [6/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Reinterpret * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [7/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Variable * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [8/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Add * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [9/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Sub * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [10/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Mul * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [11/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Div * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [12/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Mod * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [13/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Min * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [14/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Max * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [15/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const EQ * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [16/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const NE * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [17/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const LT * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [18/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const LE * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [19/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const GT * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [20/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const GE * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [21/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const And * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [22/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Or * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [23/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Not * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [24/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Select * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [25/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Load * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [26/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Ramp * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [27/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Broadcast * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [28/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Call * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [29/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Let * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [30/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const LetStmt * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [31/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const AssertStmt * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [32/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const ProducerConsumer * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [33/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const For * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [34/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Store * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [35/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Provide * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [36/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Allocate * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [37/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Free * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [38/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Realize * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [39/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Block * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [40/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const IfThenElse * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [41/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Evaluate * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [42/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Shuffle * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [43/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const VectorReduce * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [44/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Prefetch * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [45/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Acquire * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [46/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Fork * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [47/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const Atomic * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

## ◆ visit() [48/48]

void Halide::Internal::IRGraphVisitor::visit | ( | const HoistedStorage * |  | ) |
| override protected virtual

Reimplemented from Halide::Internal::IRVisitor.

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

- src/IRVisitor.h