[Mlir-commits] [mlir] ef193a7 - [mlir] Use empty() instead of checking size() == 0 (NFC)

Adrian Kuegel llvmlistbot at llvm.org
Mon Mar 7 00:41:57 PST 2022


Author: Adrian Kuegel
Date: 2022-03-07T09:41:43+01:00
New Revision: ef193a7a7c865254dfa726a07711423d2b5c69f7

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

LOG: [mlir] Use empty() instead of checking size() == 0 (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index 28f2052d66fd6..a50cac90e602c 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -400,7 +400,7 @@ struct AllocaScopeHoister : public OpRewritePattern<AllocaScopeOp> {
       return WalkResult::advance();
     });
 
-    if (!toHoist.size())
+    if (toHoist.empty())
       return failure();
     rewriter.setInsertionPoint(lastParentWithoutScope);
     for (auto op : toHoist) {


        


More information about the Mlir-commits mailing list