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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 06:48:35 PDT 2017


ABataev added a comment.

In https://reviews.llvm.org/D33320#795834, @anna wrote:

> 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).


It does not limits the number of processed nodes, it limits the tree height just like it was before.



================
Comment at: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp:4828
+    // Try to vectorize operands.
+    if (++Level < RecursionMaxDepth)
+      for (auto *Op : Inst->operand_values())
----------------
anna wrote:
> 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.
Yes, missed these checks, will add them


Repository:
  rL LLVM

https://reviews.llvm.org/D33320





More information about the llvm-commits mailing list