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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 10:17:11 PDT 2021


RKSimon accepted this revision.
RKSimon added a comment.

LGTM with a few minors



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


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1585
                  VL.begin(), VL.end(), ReuseShuffleIndices.begin(),
                  [this](Value *V, int Idx) { return V == Scalars[Idx]; });
     }
----------------
This std::equal + pragma is repeated a lot in this method - worth pulling out?


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


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