[llvm] 3ad6437 - [SLP]Fix build on MacOS, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 06:33:27 PDT 2021
Author: Alexey Bataev
Date: 2021-07-28T06:33:13-07:00
New Revision: 3ad6437fcced9122d8b0ef24b2cb6af5925e626e
URL: https://github.com/llvm/llvm-project/commit/3ad6437fcced9122d8b0ef24b2cb6af5925e626e
DIFF: https://github.com/llvm/llvm-project/commit/3ad6437fcced9122d8b0ef24b2cb6af5925e626e.diff
LOG: [SLP]Fix build on MacOS, NFC.
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index c7879cb8941e..f88d07f0b932 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2636,12 +2636,13 @@ void BoUpSLP::reorderTopToBottom(bool FreeReorder) {
if (VF == VectorizableTree.front()->Scalars.size() && !FreeReorder)
++OrdersUses[VectorizableTree.front()->ReorderIndices];
// Choose the most used order.
- ArrayRef<unsigned> BestOrder;
- unsigned Cnt;
- std::tie(BestOrder, Cnt) = *OrdersUses.begin();
+ ArrayRef<unsigned> BestOrder = OrdersUses.begin()->first;
+ unsigned Cnt = OrdersUses.begin()->second;
for (const auto &Pair : llvm::drop_begin(OrdersUses)) {
- if (Cnt < Pair.second || (Cnt == Pair.second && Pair.first.empty()))
- std::tie(BestOrder, Cnt) = Pair;
+ if (Cnt < Pair.second || (Cnt == Pair.second && Pair.first.empty())) {
+ BestOrder = Pair.first;
+ Cnt = Pair.second;
+ }
}
// Set order of the user node.
if (BestOrder.empty())
@@ -2842,12 +2843,13 @@ void BoUpSLP::reorderBottomToTop(bool FreeReorder) {
continue;
}
// Choose the best order.
- ArrayRef<unsigned> BestOrder;
- unsigned Cnt;
- std::tie(BestOrder, Cnt) = *OrdersUses.begin();
+ ArrayRef<unsigned> BestOrder = OrdersUses.begin()->first;
+ unsigned Cnt = OrdersUses.begin()->second;
for (const auto &Pair : llvm::drop_begin(OrdersUses)) {
- if (Cnt < Pair.second || (Cnt == Pair.second && Pair.first.empty()))
- std::tie(BestOrder, Cnt) = Pair;
+ if (Cnt < Pair.second || (Cnt == Pair.second && Pair.first.empty())) {
+ BestOrder = Pair.first;
+ Cnt = Pair.second;
+ }
}
// Set order of the user node (reordering of operands and user nodes).
if (BestOrder.empty()) {
More information about the llvm-commits
mailing list