[PATCH] D112224: [SLP]Change the order of the reduction/binops args pair vectorization attempts.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 06:04:23 PDT 2021


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8842
   // tryToVectorizeHorReductionOrInstOperands and save compile time.
-  SmallVector<std::pair<Instruction *, unsigned>, 8> Stack(1, {Root, 0});
+  std::queue<std::pair<Instruction *, unsigned>> Stack;
+  Stack.emplace(Root, 0);
----------------
RKSimon wrote:
> Why did you need to change this?
This order is also important, it helps to detect longer reduction chains. Better to start analysis from the deeper operands, that's why SmallVector is not the best option here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112224



More information about the llvm-commits mailing list