[PATCH] D74288: [MLIR][Affine] Add affine.parallel op

Jeremy Bruestle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 12:18:44 PST 2020


jbruestle accepted this revision.
jbruestle added a comment.

Looks good.



================
Comment at: mlir/include/mlir/Dialect/AffineOps/AffineOps.td:298
+
+      affine.parallel [%i, %j] = [0, 0] to [10, 10] step [1, 1] {
+        ...
----------------
Why use square brackets rather than parens?  In general, tuples are usually parens.


================
Comment at: mlir/lib/Dialect/AffineOps/AffineOps.cpp:141
   auto *parentOp = value.cast<BlockArgument>().getOwner()->getParentOp();
-  return isa<FuncOp>(parentOp) || isa<AffineForOp>(parentOp);
+  return isa<FuncOp>(parentOp) || isa<AffineForOp>(parentOp) ||
+         isa<AffineParallelOp>(parentOp);
----------------
I suspect this may mean that certain analysis/transforms may now fail (possibly via an assert?) if AffineParallelOp is used, but I think that probably can be fixed in later commits since nothing currently introduces AffineParallelOp yet.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74288





More information about the llvm-commits mailing list