[flang-commits] [mlir] [flang] [mlir] Handle simple commutative cases in CSE. (PR #75274)
Jacques Pienaar via flang-commits
flang-commits at lists.llvm.org
Thu Dec 14 09:35:36 PST 2023
================
@@ -1271,7 +1271,9 @@ struct OperationEquivalence {
isEquivalentTo(Operation *lhs, Operation *rhs,
function_ref<LogicalResult(Value, Value)> checkEquivalent,
function_ref<void(Value, Value)> markEquivalent = nullptr,
- Flags flags = Flags::None);
+ Flags flags = Flags::None,
+ function_ref<LogicalResult(ValueRange, ValueRange)>
+ checkCommutativeEquivalent = nullptr);
----------------
jpienaar wrote:
As this is a static function and we need to be able to inject querying the equivalence classes. Else we have to do N^2 as Matthias suggested.
https://github.com/llvm/llvm-project/pull/75274
More information about the flang-commits
mailing list