[PATCH] D57779: [SLP] Add support for throttling.

Dinar Temirbulatov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 11:32:49 PDT 2020


dtemirbulatov marked 2 inline comments as done.
dtemirbulatov added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2288-2295
+    /// Contains orders of operations along with the number of bundles that have
+    /// operations in this order. It stores only those orders that require
+    /// reordering, if reordering is not required it is counted using \a
+    /// NumOpsWantToKeepOriginalOrder.
+    DenseMap<OrdersType, unsigned, OrdersTypeDenseMapInfo>
+        NumOpsWantToKeepOrder;
+    /// Number of bundles that do not require reordering.
----------------
ABataev wrote:
> Tabs
This is now part of TreeState structure, this is LLVM's standard format(clang-format).


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3297-3300
+    // For all canceled operations we should consider the possibility of
+    // use by with non-canceled operations and for that, it requires
+    // to populate ExternalUser list with canceled elements.
+    for (int Lane = 0, LE = Entry->Scalars.size(); Lane != LE; ++Lane) {
----------------
ABataev wrote:
> Should this loop be executed only for `ProposedToGather` `Entry`s?
Yes, but we have to know the lane there.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3316-3319
+    }
+  }
+  // Canceling unprofitable elements.
+  for (std::unique_ptr<TreeEntry> &TEPtr : Tree->VectorizableTree) {
----------------
ABataev wrote:
> I actually don't see propagation for `ProposedTogather` and these loops can be merged, no?
No, No possible to merge those two loops.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4167-4170
+                     [TE](const std::unique_ptr<TreeEntry> &EntryPtr) {
+                       return EntryPtr->State != TreeEntry::Vectorize &&
+                              EntryPtr->isSame(TE.Scalars);
+                     }))
----------------
ABataev wrote:
> Tabs
this is LLVM's standard format(clang-format).


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4184
+      if (TE->State != TreeEntry::Vectorize)
+        continue;
+      int GatherCost = 0;
----------------
ABataev wrote:
> Tab
this is LLVM's standard format(clang-format).


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

https://reviews.llvm.org/D57779



More information about the llvm-commits mailing list