summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Conversion/LoopsToGPU
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-01-01 15:55:14 -0800
committerFangrui Song <maskray@google.com>2020-01-01 16:06:04 -0800
commiteeef50b1fee91dbe993187324003d2665ceae331 (patch)
tree15f68eb8fac2485d6624d4962f011dc8d64bce73 /mlir/lib/Conversion/LoopsToGPU
parent681b1be774964a804beabfb7c5e3bdab8f979e4a (diff)
downloadbcm5719-llvm-eeef50b1fee91dbe993187324003d2665ceae331.tar.gz
bcm5719-llvm-eeef50b1fee91dbe993187324003d2665ceae331.zip
[mlir] Fix -Wrange-loo-analysis warnings
for (const auto &x : llvm::zip(..., ...)) -> for (auto x : llvm::zip(..., ...)) The return type of zip() is a wrapper that wraps a tuple of references. > warning: loop variable 'p' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<long> &, ArrayRef<long> &>' does not return a reference [-Wrange-loop-analysis]
Diffstat (limited to 'mlir/lib/Conversion/LoopsToGPU')
-rw-r--r--mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
index e500d10983c..4dd703a2f0d 100644
--- a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
+++ b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
@@ -375,7 +375,7 @@ LogicalResult createLaunchFromOp(OpTy rootForOp, ArrayRef<Value> numWorkGroups,
// Replace values that are used within the region of the launchOp but are
// defined outside. They all are replaced with kernel arguments.
- for (const auto &pair :
+ for (auto pair :
llvm::zip_first(valuesToForward, launchOp.getKernelArguments())) {
Value from = std::get<0>(pair);
Value to = std::get<1>(pair);
@@ -467,7 +467,7 @@ void LoopToGpuConverter::createLaunch(OpTy rootForOp, OpTy innermostForOp,
// Remap the values defined outside the body to use kernel arguments instead.
// The list of kernel arguments also contains the lower bounds for loops at
// trailing positions, make sure we don't touch those.
- for (const auto &pair :
+ for (auto pair :
llvm::zip_first(valuesToForward, launchOp.getKernelArguments())) {
Value from = std::get<0>(pair);
Value to = std::get<1>(pair);
OpenPOWER on IntegriCloud