[PATCH] D80305: [mlir] Add folding for shape.any

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 04:46:34 PDT 2020


herhut accepted this revision.
herhut added inline comments.


================
Comment at: mlir/test/Dialect/Shape/canonicalize.mlir:154
+// -----
+// any is not yet replaced without a constant input.
+// CHECK-LABEL: func @f
----------------
silvas wrote:
> Can you expand a bit on this "yet"? Is that a direction we want to go? It seems like it would be a very small change to this patch to support that, suggesting there is a deeper reason why we want to avoid that, which would be good to document here or in AnyOp::fold
We would need to inspect operands and their types for this to work, which is more complex than just looking at constant operands. So it makes sense to land this first, if only to support static shape workloads, and expand later. A comment like `Folding of any with partially constant operands is not yet implemented` should convey this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80305





More information about the llvm-commits mailing list