[PATCH] D148378: [SLP][NFC] Remove comparator argument of `tryToVectorizeSequence()`

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 14:32:43 PDT 2023


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:14144
   bool Changed = false;
-  // Sort by type, parent, operands.
-  stable_sort(Incoming, Comparator);
----------------
ABataev wrote:
> Would be good to add the assert that the array is properly sorted, but I don't know how to do it without comparator here.
The general idea behind passing it as an argument was ensure that the incomming array is properly sorted, so we operate on potentially vectorizable lists instead of trying incompatible ones. So, it just allows do not forget about comparator for the new operations (e.g. math intrinsics calls).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148378/new/

https://reviews.llvm.org/D148378



More information about the llvm-commits mailing list