[PATCH] D148855: [SLP]Improve tryToGatherExtractElements by using per-register analysis.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 14:53:31 PDT 2023


vdmitrie added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9622
 
   /// Adjusts extractelements after reusing them.
+  Value *adjustExtracts(const TreeEntry *E, MutableArrayRef<int> Mask,
----------------
Could you extend the description too please? How input values are interpreted? What are output of the routine? Mask seems to serve both ways in and out  - that needs to be described too.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9651
+    };
+    Value *Vec = nullptr;
+    SmallVector<int> VecMask(Mask.size(), PoisonMaskElem);
----------------
Please add a comment describing intent of the code below


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:10050
+    unsigned NumParts = TTI->getNumberOfParts(FixedVectorType::get(
+        GatheredScalars.front()->getType(), GatheredScalars.size()));
+    if (NumParts == 0)
----------------
Use ScalarTy ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148855



More information about the llvm-commits mailing list