[PATCH] D78754: [shape] Basic constant folding.

Sean Silva via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 13:34:20 PDT 2020


silvas created this revision.
silvas added a reviewer: jpienaar.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, rriddle, mehdi_amini.
Herald added 1 blocking reviewer(s): jpienaar.
Herald added a project: LLVM.
silvas updated this revision to Diff 259692.
silvas added a comment.

Fix include path


- Implement a first constant fold for shape.shape_of (more ops coming in subsequent patches)
- Implement the right builder interfaces for ShapeType and other types
- Splits shape.constant into shape.const_size and shape.const_shape which plays better with dyn_cast and building vs one polymorphic op.

Also, fix the RUN line in ops.mlir to properly verify round-tripping.

Depends On D78752 <https://reviews.llvm.org/D78752> (future patches in the constant-folding patchset will)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78754

Files:
  mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
  mlir/lib/Dialect/Shape/IR/Shape.cpp
  mlir/test/Dialect/Shape/canonicalize.mlir
  mlir/test/Dialect/Shape/ops.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78754.259692.patch
Type: text/x-patch
Size: 12923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/0be1541c/attachment.bin>


More information about the llvm-commits mailing list