[Mlir-commits] [mlir] c7f3c0b - [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in TosaCanonicalizations.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Mon Oct 27 17:29:05 PDT 2025
Author: Mehdi Amini
Date: 2025-10-27T17:14:50-07:00
New Revision: c7f3c0b08f457c245071f8fedfc85a1423f86ab2
URL: https://github.com/llvm/llvm-project/commit/c7f3c0b08f457c245071f8fedfc85a1423f86ab2
DIFF: https://github.com/llvm/llvm-project/commit/c7f3c0b08f457c245071f8fedfc85a1423f86ab2.diff
LOG: [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in TosaCanonicalizations.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
index a85ff10aa0d73..293c6af6202f4 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
@@ -38,7 +38,7 @@ using namespace mlir::tosa;
//===----------------------------------------------------------------------===//
// Check that the zero point of the tensor and padding operations are aligned.
-bool checkMatchingPadConstAndZp(Value padConst, Value zp) {
+static bool checkMatchingPadConstAndZp(Value padConst, Value zp) {
// Check that padConst is a constant value and a scalar tensor
DenseElementsAttr padConstAttr;
if (!matchPattern(padConst, m_Constant(&padConstAttr)) ||
@@ -889,8 +889,9 @@ void SliceOp::getCanonicalizationPatterns(RewritePatternSet &results,
//===----------------------------------------------------------------------===//
template <typename IntFolder, typename FloatFolder>
-DenseElementsAttr binaryFolder(DenseElementsAttr lhs, DenseElementsAttr rhs,
- RankedTensorType returnTy) {
+static DenseElementsAttr binaryFolder(DenseElementsAttr lhs,
+ DenseElementsAttr rhs,
+ RankedTensorType returnTy) {
if (rhs && lhs && rhs.isSplat() && lhs.isSplat()) {
auto lETy = llvm::cast<ShapedType>(lhs.getType()).getElementType();
auto rETy = llvm::cast<ShapedType>(rhs.getType()).getElementType();
More information about the Mlir-commits
mailing list