[PATCH] D83434: [NFC][llvm-reduce] Purify for_each usage in Operand Bundles into range-based for loop
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 13:11:25 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6b824415a21c: [NFC][llvm-reduce] Purify for_each usage in Operand Bundles into range-based… (authored by lebedev.ri).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83434/new/
https://reviews.llvm.org/D83434
Files:
llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
Index: llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
===================================================================
--- llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
+++ llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
@@ -56,10 +56,9 @@
OperandBundlesToKeepIndexes.reserve(Call.getNumOperandBundles());
// Enumerate every operand bundle on this call.
- for_each(seq(0U, Call.getNumOperandBundles()), [&](unsigned BundleIndex) {
+ for (unsigned BundleIndex : seq(0U, Call.getNumOperandBundles()))
if (O.shouldKeep()) // Should we keep this one?
OperandBundlesToKeepIndexes.emplace_back(BundleIndex);
- });
}
};
@@ -102,9 +101,8 @@
OperandBundleRemapper R(ChunksToKeep);
R.visit(Program);
- for_each(R.CallsToRefine, [](const auto &P) {
- return maybeRewriteCallWithDifferentBundles(P.first, P.second);
- });
+ for (const auto &I : R.CallsToRefine)
+ maybeRewriteCallWithDifferentBundles(I.first, I.second);
}
/// Counts the amount of operand bundles.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83434.276819.patch
Type: text/x-patch
Size: 1044 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200709/2ae0e22e/attachment-0001.bin>
More information about the llvm-commits
mailing list