[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops
Jeff Niu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 07:53:57 PDT 2022
Mogball added a comment.
I need to look at the algorithm in more detail, but I'm not a fan of using a string key. Concatenating strings to make compound keys is not very efficient and potentially brittle. Can you assign unique IDs and use an array of IDs instead?
================
Comment at: mlir/include/mlir/Transforms/CommutativityUtils.h:24
+
+void sortCommutativeOperands(Operation *op, PatternRewriter &rewriter);
+
----------------
Add documentation? Similar to what you have in the patch description.
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