[Mlir-commits] [mlir] b788e35 - [Transforms] Use all_of instead of any_of (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Sun Jan 2 22:53:15 PST 2022
Author: Kazu Hirata
Date: 2022-01-02T22:53:09-08:00
New Revision: b788e352abb8abd166d62066dd24fcc1a3923856
URL: https://github.com/llvm/llvm-project/commit/b788e352abb8abd166d62066dd24fcc1a3923856
DIFF: https://github.com/llvm/llvm-project/commit/b788e352abb8abd166d62066dd24fcc1a3923856.diff
LOG: [Transforms] Use all_of instead of any_of (NFC)
Added:
Modified:
mlir/lib/Transforms/NormalizeMemRefs.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/NormalizeMemRefs.cpp b/mlir/lib/Transforms/NormalizeMemRefs.cpp
index aaf1a5717b463..b6f9d1858fa30 100644
--- a/mlir/lib/Transforms/NormalizeMemRefs.cpp
+++ b/mlir/lib/Transforms/NormalizeMemRefs.cpp
@@ -92,8 +92,8 @@ void NormalizeMemRefs::runOnOperation() {
/// are satisfied will the value become a candidate for replacement.
/// TODO: Extend this for DimOps.
static bool isMemRefNormalizable(Value::user_range opUsers) {
- return !llvm::any_of(opUsers, [](Operation *op) {
- return !op->hasTrait<OpTrait::MemRefsNormalizable>();
+ return llvm::all_of(opUsers, [](Operation *op) {
+ return op->hasTrait<OpTrait::MemRefsNormalizable>();
});
}
More information about the Mlir-commits
mailing list