[PATCH] D135174: [SLP]Redesign vectorization of the gather nodes.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 07:32:54 PDT 2022


RKSimon added a comment.

a few minors



================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4009
 void BoUpSLP::reorderNodeWithReuses(TreeEntry &TE, ArrayRef<int> Mask) const {
   // For vectorized and non-clustered reused - just reorder reuses mask.
+  reorderReuses(TE.ReuseShuffleIndices, Mask);
----------------
Split + update comments


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8129
+                              TE->UserTreeIndices.front().EdgeIdx == NodeIdx &&
+                              TE->UserTreeIndices.front().UserTE == E &&
+                              VE->isSame(TE->Scalars);
----------------
We do this matching in a couple of places now - worth adding as a TreeEntry helper method?


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8200
+
+Value *BoUpSLP::createBuildVector(const TreeEntry *E) {
+  assert(E->State == TreeEntry::NeedToGather && "Expected gather node.");
----------------
Add some comments describing whats happening in this method.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135174



More information about the llvm-commits mailing list