[Mlir-commits] [mlir] 23f989a - Apply clang-tidy fixes for readability-simplify-boolean-expr in BufferizableOpInterfaceImpl.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Oct 11 18:17:11 PDT 2022


Author: Mehdi Amini
Date: 2022-10-12T01:16:36Z
New Revision: 23f989a2e3dee21b2ab563441f78adbb3dd42a4b

URL: https://github.com/llvm/llvm-project/commit/23f989a2e3dee21b2ab563441f78adbb3dd42a4b
DIFF: https://github.com/llvm/llvm-project/commit/23f989a2e3dee21b2ab563441f78adbb3dd42a4b.diff

LOG: Apply clang-tidy fixes for readability-simplify-boolean-expr in BufferizableOpInterfaceImpl.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
index 2f1e1a837b890..6c54ffea6e3ea 100644
--- a/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
@@ -1148,11 +1148,9 @@ struct ForeachThreadOpInterface
   bool isRepetitiveRegion(Operation *op, unsigned index) const {
     auto foreachThreadOp = cast<ForeachThreadOp>(op);
     // This op is not repetitive if it has just a single thread.
-    if (llvm::all_of(foreachThreadOp.getNumThreads(), [](Value v) {
-          return getConstantIntValue(v) == static_cast<int64_t>(1);
-        }))
-      return false;
-    return true;
+    return !llvm::all_of(foreachThreadOp.getNumThreads(), [](Value v) {
+      return getConstantIntValue(v) == static_cast<int64_t>(1);
+    });
   }
 };
 


        


More information about the Mlir-commits mailing list