[Mlir-commits] [mlir] b3a2208 - [mlir] Apply ClangTidy fixes.
Adrian Kuegel
llvmlistbot at llvm.org
Tue Sep 17 04:03:26 PDT 2024
Author: Adrian Kuegel
Date: 2024-09-17T11:02:20Z
New Revision: b3a2208c566c475f7d1b6d40c67aec100ae29103
URL: https://github.com/llvm/llvm-project/commit/b3a2208c566c475f7d1b6d40c67aec100ae29103
DIFF: https://github.com/llvm/llvm-project/commit/b3a2208c566c475f7d1b6d40c67aec100ae29103.diff
LOG: [mlir] Apply ClangTidy fixes.
- Prefer to check empty() instead of size() == 0.
- Remove unused using declarations.
Added:
Modified:
mlir/lib/Dialect/SCF/Transforms/ForallToFor.cpp
mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/Transforms/ForallToFor.cpp b/mlir/lib/Dialect/SCF/Transforms/ForallToFor.cpp
index 5da1b76e929be4..a2f03f1e1056ed 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ForallToFor.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ForallToFor.cpp
@@ -23,8 +23,6 @@ namespace mlir {
using namespace llvm;
using namespace mlir;
-using scf::ForallOp;
-using scf::ForOp;
using scf::LoopNest;
LogicalResult
diff --git a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
index 5934d85373b03d..e172f02c00f516 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
@@ -85,7 +85,7 @@ static bool haveNoReadsAfterWriteExceptSameIndex(
return WalkResult::advance();
// Check that at last one store was retrieved
- if (!write->second.size())
+ if (write->second.empty())
return WalkResult::interrupt();
auto storeIndices = write->second.front();
More information about the Mlir-commits
mailing list