[PATCH] D112467: [SLP]Do not reorder reduction nodes.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 14:13:57 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2823
 
-void BoUpSLP::reorderBottomToTop() {
+void BoUpSLP::reorderBottomToTop(bool FreeReorder) {
   SetVector<TreeEntry *> OrderedEntries;
----------------
Is FreeOrder the right name? Its suggests a cost but AFAICT this really just says that the final order is irrelevant/unecessary?


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8472
       V.reorderTopToBottom();
-      V.reorderBottomToTop();
+      V.reorderBottomToTop(/*FreeReorder=*/true);
       V.buildExternalUses(ExternallyUsedValues);
----------------
Is this always true for float reductions? Doesn't it need the 'reassoc' flag?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112467



More information about the llvm-commits mailing list