tvm
Public Member Functions | List of all members
tvm::tir::ExprDeepEqual Struct Reference

Compare two expressions recursively and check if they are equal to each other without var remapping. More...

#include <analysis.h>

Collaboration diagram for tvm::tir::ExprDeepEqual:

Public Member Functions

bool operator() (const PrimExpr &lhs, const PrimExpr &rhs) const
 

Detailed Description

Compare two expressions recursively and check if they are equal to each other without var remapping.

This function does not remap variable bindings, it will not return true for (let x = 1 in x + 1) vs (let y = 1 in y + 1), unless x.same_as(y).

Use StructuralEqual for such cases.

Due to the restriction of not remapping variables, this function can run faster than StructuralEqual and can be used as a utility function during arithmetic simplifications.

See also
StructuralEqual

Member Function Documentation

◆ operator()()

bool tvm::tir::ExprDeepEqual::operator() ( const PrimExpr lhs,
const PrimExpr rhs 
) const

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