[mlir] Use empty() instead of checking size() == 0 (NFC)
authorAdrian Kuegel <akuegel@google.com>
Mon, 7 Mar 2022 08:40:49 +0000 (09:40 +0100)
committerAdrian Kuegel <akuegel@google.com>
Mon, 7 Mar 2022 08:41:43 +0000 (09:41 +0100)
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

index 28f2052..a50cac9 100644 (file)
@@ -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) {