[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops
Mehdi AMINI via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 14 13:18:40 PDT 2022
mehdi_amini added inline comments.
================
Comment at: mlir/include/mlir/Transforms/CommutativityUtils.h:211
+template <typename OpTy>
+class SortCommutativeOperands : public OpRewritePattern<OpTy> {
+ using OpRewritePattern<OpTy>::OpRewritePattern;
----------------
Can we make this not a template? This will be a code bloat otherwise.
================
Comment at: mlir/include/mlir/Transforms/CommutativityUtils.h:332
+
+} // namespace mlir
+
----------------
There seems to me to be far too much code in the public head: I can't isolate the public API here, if this is just about a pattern then the usual way is to have a "populate" method.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124750/new/
https://reviews.llvm.org/D124750
More information about the cfe-commits
mailing list