[PATCH] D105020: [SLP]Improve graph reordering.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 10:22:54 PDT 2021


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:540
+static void addMask(SmallVectorImpl<int> &Mask, ArrayRef<int> SubMask);
+static void fixupOrderingIndices(SmallVectorImpl<unsigned> &Order);
+
----------------
RKSimon wrote:
> Why didn't you move these up here instead of forward declaring?
Just to reduce the number of changes, will move the functions here.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1585
                  VL.begin(), VL.end(), ReuseShuffleIndices.begin(),
                  [this](Value *V, int Idx) { return V == Scalars[Idx]; });
     }
----------------
RKSimon wrote:
> This std::equal + pragma is repeated a lot in this method - worth pulling out?
Ok, will try to transform it into a lambda or something similar.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3429
+                    decltype(OrdCompare)>
+          Indeces(OrdCompare);
+      for (int I = 0, E = VL.size(); I < E; ++I) {
----------------
RKSimon wrote:
> Indices?
Yep, will fix it, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105020



More information about the llvm-commits mailing list