[MLIR][Shape] Add conversion for missing ops to standard
authorStephan Herhut <herhut@google.com>
Tue, 28 Jul 2020 17:08:40 +0000 (19:08 +0200)
committerStephan Herhut <herhut@google.com>
Wed, 29 Jul 2020 10:46:18 +0000 (12:46 +0200)
commit5d9f33aaa00cc02143f137387adc8dd1e51b71d3
tree3d7d54e332bfdea25bc3364f81c25a9aaaf414b6
parent0c005be6eb6bc21464d7c1f7d5f44eb1e5369749
[MLIR][Shape] Add conversion for missing ops to standard

This adds conversions for const_size and to_extent_tensor. Also, cast-like operations are now folded away if the source and target types are the same.

Differential Revision: https://reviews.llvm.org/D84745
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
mlir/test/Dialect/Shape/canonicalize.mlir