[mlir][transforms] Simplify OperationEquivalence and CSE
Replace `mapOperands` and `mapResults` with two new callbacks. It was not clear what "mapping" meant and why the equivalence relationship was a property of the Operand/OpResult as opposed to just SSA values. This revision changes the contract of the two callbacks: `checkEquivalent` compares two values for equivalence. `markEquivalent` informs the caller that the analysis determined that two values are equivalent. This simplifies the API because callers do not have to reason about operands/results, but just SSA values. `OperationEquivalence::isEquivalentTo` can be used directly in CSE and there is no need for a custom op equivalence analysis. Differential Revision: https://reviews.llvm.org/D142558
Loading
Please sign in to comment