[PATCH] D120492: [SLP]Improve bottom-to-top reordering.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 13:00:40 PST 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3428
+            // order.
+            Data.second.emplace_back(I, TE);
+            continue;
----------------
vporpo wrote:
> I am a bit confused with what is going on here. I was under the impression that the `Users` map holds the edges towards the operands (which btw should probably be part of TreeEntry and built during `buildTree`?). Why are we adding edges here?
Oririginally, `Users` contains edges between reorderable operands only (vector operands with reordering data or loads/extractelements and/or gathers of extractselements that require reordering). Here we add some extra vectorizable operands, if they were not added, because they did not have the reordering data.
We add the vectorizable operands here as they still may require reordering, while gathers are free for reroder.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120492/new/

https://reviews.llvm.org/D120492



More information about the llvm-commits mailing list