[PATCH] D72094: [mlir][linalg] Lower linalg to affine loops

Ahmed S. Taei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 09:37:50 PST 2020


asaadaldien marked 5 inline comments as done.
asaadaldien added inline comments.


================
Comment at: mlir/lib/Dialect/Linalg/Utils/Utils.cpp:113
+  for (const Value range : ranges) {
+    RangeOp rangeOp = cast<RangeOp>(range.getDefiningOp());
+    lbs.push_back(ValueHandle(rangeOp.min()));
----------------
mravishankar wrote:
> ftynse wrote:
> > Does something guarantee that there is a defining op?
> You can probably change `emitLoopRanges` that generates the `ranges` argument at the called of this function to return `Operation *` instead of `Value`.
Added assertions for the underlying type


================
Comment at: mlir/lib/Dialect/Linalg/Utils/Utils.cpp:113
+  for (const Value range : ranges) {
+    RangeOp rangeOp = cast<RangeOp>(range.getDefiningOp());
+    lbs.push_back(ValueHandle(rangeOp.min()));
----------------
asaadaldien wrote:
> mravishankar wrote:
> > ftynse wrote:
> > > Does something guarantee that there is a defining op?
> > You can probably change `emitLoopRanges` that generates the `ranges` argument at the called of this function to return `Operation *` instead of `Value`.
> Added assertions for the underlying type
We can keep it as ranges to have now to keep interface same as underlying RangeBuilders. We can revisit using ranges here in a different diff.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72094





More information about the llvm-commits mailing list