[PATCH] D108740: [SLP]Improve vectorization of phi nodes by trying wider vectors.

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 26 11:05:17 PDT 2021


anton-afanasyev added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h:100
+                          bool AllowReorder = false,
+                          bool LimitForRegisterSize = false);
 
----------------
Comment new arg?


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8552
+                                            /*AllowReorder=*/true,
+                                            /*LimitForRegisterSize=*/true)) {
         // Success start over because instructions might have been changed.
----------------
Looks like we need comment here as well: why setting `LimitForRegisterSize` for phi nodes.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8569
+        } else {
+          // Try to vectorize using small vectors.
+          for (SmallVector<Value *, 4>::iterator It = Candidates.begin(),
----------------
We get here unnecessarily if `Candidates.size() == 1`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108740



More information about the llvm-commits mailing list