Halide  17.0.2
Halide compiler and libraries
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>

Inherits Halide::Internal::IRVisitor.

Inherited by Halide::Internal::ExprUsesVars< T >.

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

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 )
protectedvirtual

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 )
protectedvirtual

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.

◆ visit() [1/48]

void Halide::Internal::IRGraphVisitor::visit ( const IntImm )
overrideprotectedvirtual

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 )
overrideprotectedvirtual

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() [3/48]

void Halide::Internal::IRGraphVisitor::visit ( const FloatImm )
overrideprotectedvirtual

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() [4/48]

void Halide::Internal::IRGraphVisitor::visit ( const StringImm )
overrideprotectedvirtual

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() [5/48]

void Halide::Internal::IRGraphVisitor::visit ( const Cast )
overrideprotectedvirtual

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() [6/48]

void Halide::Internal::IRGraphVisitor::visit ( const Reinterpret )
overrideprotectedvirtual

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() [7/48]

void Halide::Internal::IRGraphVisitor::visit ( const Variable )
overrideprotectedvirtual

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() [8/48]

void Halide::Internal::IRGraphVisitor::visit ( const Add )
overrideprotectedvirtual

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() [9/48]

void Halide::Internal::IRGraphVisitor::visit ( const Sub )
overrideprotectedvirtual

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() [10/48]

void Halide::Internal::IRGraphVisitor::visit ( const Mul )
overrideprotectedvirtual

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() [11/48]

void Halide::Internal::IRGraphVisitor::visit ( const Div )
overrideprotectedvirtual

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() [12/48]

void Halide::Internal::IRGraphVisitor::visit ( const Mod )
overrideprotectedvirtual

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() [13/48]

void Halide::Internal::IRGraphVisitor::visit ( const Min )
overrideprotectedvirtual

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() [14/48]

void Halide::Internal::IRGraphVisitor::visit ( const Max )
overrideprotectedvirtual

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() [15/48]

void Halide::Internal::IRGraphVisitor::visit ( const EQ )
overrideprotectedvirtual

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() [16/48]

void Halide::Internal::IRGraphVisitor::visit ( const NE )
overrideprotectedvirtual

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() [17/48]

void Halide::Internal::IRGraphVisitor::visit ( const LT )
overrideprotectedvirtual

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() [18/48]

void Halide::Internal::IRGraphVisitor::visit ( const LE )
overrideprotectedvirtual

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() [19/48]

void Halide::Internal::IRGraphVisitor::visit ( const GT )
overrideprotectedvirtual

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() [20/48]

void Halide::Internal::IRGraphVisitor::visit ( const GE )
overrideprotectedvirtual

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() [21/48]

void Halide::Internal::IRGraphVisitor::visit ( const And )
overrideprotectedvirtual

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() [22/48]

void Halide::Internal::IRGraphVisitor::visit ( const Or )
overrideprotectedvirtual

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() [23/48]

void Halide::Internal::IRGraphVisitor::visit ( const Not )
overrideprotectedvirtual

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() [24/48]

void Halide::Internal::IRGraphVisitor::visit ( const Select )
overrideprotectedvirtual

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() [25/48]

void Halide::Internal::IRGraphVisitor::visit ( const Load )
overrideprotectedvirtual

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() [26/48]

void Halide::Internal::IRGraphVisitor::visit ( const Ramp )
overrideprotectedvirtual

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() [27/48]

void Halide::Internal::IRGraphVisitor::visit ( const Broadcast )
overrideprotectedvirtual

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() [28/48]

void Halide::Internal::IRGraphVisitor::visit ( const Call )
overrideprotectedvirtual

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() [29/48]

void Halide::Internal::IRGraphVisitor::visit ( const Let )
overrideprotectedvirtual

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() [30/48]

void Halide::Internal::IRGraphVisitor::visit ( const LetStmt )
overrideprotectedvirtual

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() [31/48]

void Halide::Internal::IRGraphVisitor::visit ( const AssertStmt )
overrideprotectedvirtual

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() [32/48]

void Halide::Internal::IRGraphVisitor::visit ( const ProducerConsumer )
overrideprotectedvirtual

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() [33/48]

void Halide::Internal::IRGraphVisitor::visit ( const For )
overrideprotectedvirtual

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() [34/48]

void Halide::Internal::IRGraphVisitor::visit ( const Store )
overrideprotectedvirtual

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() [35/48]

void Halide::Internal::IRGraphVisitor::visit ( const Provide )
overrideprotectedvirtual

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() [36/48]

void Halide::Internal::IRGraphVisitor::visit ( const Allocate )
overrideprotectedvirtual

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() [37/48]

void Halide::Internal::IRGraphVisitor::visit ( const Free )
overrideprotectedvirtual

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() [38/48]

void Halide::Internal::IRGraphVisitor::visit ( const Realize )
overrideprotectedvirtual

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() [39/48]

void Halide::Internal::IRGraphVisitor::visit ( const Block )
overrideprotectedvirtual

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() [40/48]

void Halide::Internal::IRGraphVisitor::visit ( const IfThenElse )
overrideprotectedvirtual

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() [41/48]

void Halide::Internal::IRGraphVisitor::visit ( const Evaluate )
overrideprotectedvirtual

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() [42/48]

void Halide::Internal::IRGraphVisitor::visit ( const Shuffle )
overrideprotectedvirtual

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() [43/48]

void Halide::Internal::IRGraphVisitor::visit ( const VectorReduce )
overrideprotectedvirtual

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() [44/48]

void Halide::Internal::IRGraphVisitor::visit ( const Prefetch )
overrideprotectedvirtual

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() [45/48]

void Halide::Internal::IRGraphVisitor::visit ( const Acquire )
overrideprotectedvirtual

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() [46/48]

void Halide::Internal::IRGraphVisitor::visit ( const Fork )
overrideprotectedvirtual

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() [47/48]

void Halide::Internal::IRGraphVisitor::visit ( const Atomic )
overrideprotectedvirtual

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() [48/48]

void Halide::Internal::IRGraphVisitor::visit ( const HoistedStorage )
overrideprotectedvirtual

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

Reimplemented from Halide::Internal::IRVisitor.


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