[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 May 26 10:44:27 PDT 2017


anemet added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4824-4825
+  // vectorization is not possible or not effective, and currently analyzed
+  // instruction is a binary operation, try to vectorize the operands, using DFS
+  // traversal order. If the operands were not vectorized, repeat the same
+  // procedure considering each operand as a possible root of the horizontal
----------------
ABataev wrote:
> anemet wrote:
> > ABataev wrote:
> > > anemet wrote:
> > > > ABataev wrote:
> > > > > anemet wrote:
> > > > > > ABataev wrote:
> > > > > > > anemet wrote:
> > > > > > > > Again, which order?
> > > > > > > DFS
> > > > > > pre/in/post?
> > > > > pre
> > > > Okay, then please update the comment.  Also please answer my question below why we chose to track the edges with an iterative pre-order traversal.  If it's unnecessary, please fix or add a FIXME.  Thank you.
> > > It simplifies limiting the tree traversal level of the function. We can use simple pre-order traversal, but still need to keep the tree node level within the Stack, for example, to limit the recursion level.
> > I am not sure I see a major difference, do you have an example?
> I'm just saying that there is no major difference. We won't win anything by using of pre-order traversal comparing with DFS preorder traversal. We will need to track the current tree depth to be able to cut off the vectorization process if the tree depth is more than `RecursionMaxDepth` (see line 4879).
> I'm just saying that there is no major difference. We won't win anything by using of pre-order traversal comparing with DFS preorder traversal.

Now I am confused.  pre-order traversal *is* DFS pre-order traversal.




https://reviews.llvm.org/D33320





More information about the llvm-commits mailing list