[PATCH] D78226: [MLIR] Improve support for 0-dimensional Affine Maps.

Jeremy Bruestle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 12:03:55 PDT 2020


jbruestle updated this revision to Diff 257788.
jbruestle added a comment.

Fixes from code review


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78226/new/

https://reviews.llvm.org/D78226

Files:
  mlir/lib/IR/AffineMap.cpp


Index: mlir/lib/IR/AffineMap.cpp
===================================================================
--- mlir/lib/IR/AffineMap.cpp
+++ mlir/lib/IR/AffineMap.cpp
@@ -127,8 +127,8 @@
 template <typename AffineExprContainer>
 static SmallVector<AffineMap, 4>
 inferFromExprList(ArrayRef<AffineExprContainer> exprsList) {
-  assert(exprsList.size() != 0);
-  assert(exprsList[0].size() != 0);
+  assert(!exprsList.empty());
+  assert(!exprsList[0].empty());
   auto context = exprsList[0][0].getContext();
   int64_t maxDim = -1, maxSym = -1;
   getMaxDimAndSymbol(exprsList, maxDim, maxSym);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78226.257788.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/be19ee3f/attachment.bin>


More information about the llvm-commits mailing list