This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add target for Shape dialect
ClosedPublic

Authored by jpienaar on Mar 17 2020, 1:43 PM.

Details

Summary

BEGIN_PUBLIC
[mlir] Add target for Shape dialect

Add targets and basic printing/parsing of types in Shape dialect.
END_PUBLIC

Diff Detail

Event Timeline

jpienaar created this revision.Mar 17 2020, 1:43 PM

Thanks, this is a good start.

mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
222–223

Shape_SizeType?

mlir/lib/Dialect/Shape/IR/Shape.cpp
27–28

Can we remove this? Just use "foo.op" instead of "shape.op" during testing?

mlir/test/Dialect/Shape/ops.mlir
30

Can we use "!shape.shape" it seems a lot more readable to me.

silvas accepted this revision.Mar 17 2020, 2:27 PM

LGTM after comments are addressed.

This revision is now accepted and ready to land.Mar 17 2020, 2:27 PM
jpienaar updated this revision to Diff 250918.Mar 17 2020, 2:51 PM

Rename shape.type to shape.shape

jpienaar marked 4 inline comments as done.Mar 17 2020, 2:52 PM

Updated, thanks

mlir/lib/Dialect/Shape/IR/Shape.cpp
27–28

Expanded the comment to mention it is also for prototyping while the dialect is still changing a lot.

jpienaar closed this revision.Mar 17 2020, 2:55 PM
jpienaar marked an inline comment as done.
mlir/lib/Dialect/CMakeLists.txt