[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops
Jacques Pienaar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 08:27:28 PDT 2022
jpienaar added a comment.
> (1) the operands defined by non-constant-like ops come first, followed by (2) block arguments, and these are followed by (3) the operands defined by constant-like ops.
I would have thought block-arguments would come first as we don't know their values, while non-constant-like ops could be folded at some point and then become constant-like. Meaning, they seem closer to constant than block arguments.
+1 to Mehdi's question about just stable sorting based on based on 4 criteria (3 buckets + ordering within (1)) and then we should be able to avoid all the string mangling too as Jeff asked about.
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