[Mlir-commits] [mlir] f2b6ec6 - [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in NormalizeQuantTypes.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Wed Sep 10 14:50:23 PDT 2025
Author: Mehdi Amini
Date: 2025-09-10T14:49:52-07:00
New Revision: f2b6ec689b5abe65c1aa4c50a2c7ef2f290f0a08
URL: https://github.com/llvm/llvm-project/commit/f2b6ec689b5abe65c1aa4c50a2c7ef2f290f0a08
DIFF: https://github.com/llvm/llvm-project/commit/f2b6ec689b5abe65c1aa4c50a2c7ef2f290f0a08.diff
LOG: [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in NormalizeQuantTypes.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Quant/Transforms/NormalizeQuantTypes.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Quant/Transforms/NormalizeQuantTypes.cpp b/mlir/lib/Dialect/Quant/Transforms/NormalizeQuantTypes.cpp
index 1c3971d262042..1940e6d4d62b4 100644
--- a/mlir/lib/Dialect/Quant/Transforms/NormalizeQuantTypes.cpp
+++ b/mlir/lib/Dialect/Quant/Transforms/NormalizeQuantTypes.cpp
@@ -88,10 +88,10 @@ class NormalizedQuantTypesConverter : public TypeConverter {
llvm::find_if(shape, [](int64_t dim) { return dim != 1; });
auto scales = llvm::to_vector(llvm::map_range(
subChannelType.getScales().getValues<APFloat>(),
- [](APFloat scale) { return scale.convertToDouble(); }));
+ [](const APFloat &scale) { return scale.convertToDouble(); }));
auto zeroPoints = llvm::to_vector(llvm::map_range(
subChannelType.getZeroPoints().getValues<APInt>(),
- [](APInt zeroPoint) { return zeroPoint.getSExtValue(); }));
+ [](const APInt &zeroPoint) { return zeroPoint.getSExtValue(); }));
auto perAxisType = UniformQuantizedPerAxisType::get(
subChannelType.getFlags(), subChannelType.getStorageType(),
subChannelType.getExpressedType(), scales, zeroPoints,
More information about the Mlir-commits
mailing list