[Mlir-commits] [mlir] 29128f2 - [MLIR] Apply clang-tidy fixes for readability-identifier-naming in ConversionUtils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Sep 6 07:33:07 PDT 2025
Author: Mehdi Amini
Date: 2025-09-06T07:31:17-07:00
New Revision: 29128f22345d38377149a6e34e34e2ac07a45c38
URL: https://github.com/llvm/llvm-project/commit/29128f22345d38377149a6e34e34e2ac07a45c38
DIFF: https://github.com/llvm/llvm-project/commit/29128f22345d38377149a6e34e34e2ac07a45c38.diff
LOG: [MLIR] Apply clang-tidy fixes for readability-identifier-naming in ConversionUtils.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp b/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
index 69eda03e03ab3..ac5d6207259eb 100644
--- a/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
+++ b/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
@@ -162,8 +162,8 @@ Value mlir::tosa::getTosaConstShape(ImplicitLocOpBuilder &builder,
llvm::ArrayRef<int64_t> shape) {
auto attr = builder.getIndexTensorAttr(convertFromMlirShape(shape));
auto type = mlir::tosa::shapeType::get(builder.getContext(), shape.size());
- mlir::Operation *mlir_op = tosa::ConstShapeOp::create(builder, type, attr);
- return mlir_op->getResult(0);
+ mlir::Operation *mlirOp = tosa::ConstShapeOp::create(builder, type, attr);
+ return mlirOp->getResult(0);
}
Value mlir::tosa::getTosaConstShape(PatternRewriter &rewriter, Location loc,
@@ -179,7 +179,7 @@ SmallVector<int64_t> mlir::tosa::convertFromMlirShape(ArrayRef<int64_t> shape) {
}
bool mlir::tosa::getConstShapeValues(Operation *op,
- llvm::SmallVector<int64_t> &result_shape) {
+ llvm::SmallVector<int64_t> &resultShape) {
if (!op) {
return false;
}
@@ -188,7 +188,7 @@ bool mlir::tosa::getConstShapeValues(Operation *op,
DenseElementsAttr elementsAttr = cast<DenseElementsAttr>(constOpAttr);
for (int i = 0; i < elementsAttr.size(); i++) {
int64_t val = elementsAttr.getValues<int64_t>()[i];
- result_shape.push_back(val);
+ resultShape.push_back(val);
}
return true;
}
@@ -204,9 +204,9 @@ mlir::tosa::convertFromIntAttr(const DenseElementsAttr &attr, const int rank) {
return SmallVector<int64_t>(rank, v);
}
- if (auto int_array_attr = llvm::dyn_cast<DenseIntElementsAttr>(attr)) {
+ if (auto intArrayAttr = llvm::dyn_cast<DenseIntElementsAttr>(attr)) {
SmallVector<int64_t> vec;
- for (APInt val : int_array_attr.getValues<APInt>()) {
+ for (APInt val : intArrayAttr.getValues<APInt>()) {
vec.push_back(val.getSExtValue());
}
return vec;
More information about the Mlir-commits
mailing list