[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
Thu May 25 14:26:55 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:
> > > > > > 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?
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4861
if (!Inst) {
P = nullptr;
continue;
----------------
It would be good to add a comment why we need to clear P beyond the first level.
https://reviews.llvm.org/D33320
More information about the llvm-commits
mailing list