[Mlir-commits] [mlir] 3cf42c3 - [mlir] Apply ClangTidy readability finding (NFC)

Adrian Kuegel llvmlistbot at llvm.org
Mon Mar 6 03:42:44 PST 2023


Author: Adrian Kuegel
Date: 2023-03-06T12:42:03+01:00
New Revision: 3cf42c3f5dd3c03246ca13ad1a1d6abad33eeab8

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

LOG: [mlir] Apply ClangTidy readability finding (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp b/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
index 2d1b544e468c8..e1b929c8b121e 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
@@ -157,7 +157,7 @@ getOrCreatePackedViewOfOperand(OpBuilder &b, Location loc, PackInfo packInfo,
   AffineMap origIndexingMap = genericOp.getMatchingIndexingMap(opOperand);
   llvm::DenseMap<int64_t, int64_t> domainDimToOperandDim;
   SmallVector<AffineExpr> exprs(origIndexingMap.getResults());
-  if (genericOp.isScalar(opOperand) || exprs.size() == 0)
+  if (genericOp.isScalar(opOperand) || exprs.empty())
     return std::make_tuple(opOperand->get(),
                            AffineMap::get(numLoops, 0, exprs, b.getContext()));
 


        


More information about the Mlir-commits mailing list