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

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 07:28:28 PDT 2017


anemet added a comment.

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

> In https://reviews.llvm.org/D33320#796679, @ABataev wrote:
>
> > 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.
>
>
> Yes, but limiting the tree height itself is not enough right? Now, in the worst case,  2^12 nodes being processed in the `tryToVectorizeHorReductionOrInstOperands`, when earlier it was just a single node (i.e. before this change: https://reviews.llvm.org/D25517).


@anna, I am confused whether you're complaining about the additional overhead in the original change (https://reviews.llvm.org/D25517) or the algorithmic change in this refinement (https://reviews.llvm.org/D33320).  Your comparison above seems to suggest your baseline is *before* the original changes.

In this refinement change, we can have more nodes on the stack compared to the original change but the number of nodes processed should remain unchanged.


Repository:
  rL LLVM

https://reviews.llvm.org/D33320





More information about the llvm-commits mailing list