[PATCH] D75831: [mlir][Linalg] Revisit 0-D abstraction

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 8 12:48:13 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/lib/IR/AffineMap.cpp:328
 AffineMap mlir::inversePermutation(AffineMap map) {
-  if (!map)
+  assert(map);
+  if (map.isEmpty())
----------------
Do we need these asserts? None of the other methods assert this.


================
Comment at: mlir/lib/IR/AffineMap.cpp:353
 AffineMap mlir::concatAffineMaps(ArrayRef<AffineMap> maps) {
+  assert(!maps.empty());
+  assert(llvm::all_of(maps, [](AffineMap m) { return m; }));
----------------
Same here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75831





More information about the llvm-commits mailing list