[llvm] 6a23668 - [SLP] remove uses of 'auto' that obscure functionality; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 05:27:28 PDT 2020
Author: Sanjay Patel
Date: 2020-09-16T08:26:21-04:00
New Revision: 6a23668e78b05703ccba552e09b09b8055924bb6
URL: https://github.com/llvm/llvm-project/commit/6a23668e78b05703ccba552e09b09b8055924bb6
DIFF: https://github.com/llvm/llvm-project/commit/6a23668e78b05703ccba552e09b09b8055924bb6.diff
LOG: [SLP] remove uses of 'auto' that obscure functionality; 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 0fc5d1a810b50..619964a6f457c 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6817,9 +6817,9 @@ class HorizontalReduction {
Builder.setFastMathFlags(Unsafe);
BoUpSLP::ExtraValueToDebugLocsMap ExternallyUsedValues;
- // The same extra argument may be used several time, so log each attempt
+ // The same extra argument may be used several times, so log each attempt
// to use it.
- for (auto &Pair : ExtraArgs) {
+ for (std::pair<Instruction *, Value *> &Pair : ExtraArgs) {
assert(Pair.first && "DebugLoc must be set.");
ExternallyUsedValues[Pair.second].push_back(Pair.first);
}
@@ -6844,7 +6844,7 @@ class HorizontalReduction {
unsigned i = 0;
while (i < NumReducedVals - ReduxWidth + 1 && ReduxWidth > 2) {
- auto VL = makeArrayRef(&ReducedVals[i], ReduxWidth);
+ ArrayRef<Value *> VL = makeArrayRef(&ReducedVals[i], ReduxWidth);
V.buildTree(VL, ExternallyUsedValues, IgnoreList);
Optional<ArrayRef<unsigned>> Order = V.bestOrder();
// TODO: Handle orders of size less than number of elements in the vector.
More information about the llvm-commits
mailing list