[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
Fri Jul 29 10:42:43 PDT 2022


Mogball added a comment.

I'm referring to the nitty gritty details of the while loop inside the comparator. It looks pretty tight to me right now. If the operands are already sorted, worst-case each operand is compared against only its neighbours. Unfortunately, without extra bookkeeping, BFS will still need to iterate when necessary


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