[PATCH] D33320: [SLP] Improve comments and naming of functions/variables/members, NFC.

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 14:15:11 PDT 2017


anna added a comment.

Hi Alexey, Adam,

>From what I can see in this algorithm, there is no limit on the actual size of the stack in the loop. The level variable controls just the recursion limit. So, in effect, IIUC, the max total number of operands being processed by the while loop is 2 ^ RecursionLimit (it's to the base 2 because we avoid phi nodes).



================
Comment at: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp:4828
+    // Try to vectorize operands.
+    if (++Level < RecursionMaxDepth)
+      for (auto *Op : Inst->operand_values())
----------------
Could you please explain how this is NFC wrt the previous code?
In the code on the LHS, we are checking that the operand is in the same basic block as the root before placing it on the stack.

Here we are unconditionally placing all operands on the stack.


Repository:
  rL LLVM

https://reviews.llvm.org/D33320





More information about the llvm-commits mailing list