[MLIR][Shape] Lower `shape.rank`
authorFrederik Gossen <frgossen@google.com>
Thu, 25 Jun 2020 08:42:40 +0000 (08:42 +0000)
committerFrederik Gossen <frgossen@google.com>
Thu, 25 Jun 2020 08:44:06 +0000 (08:44 +0000)
commit24debf5a76e03cfeab6df2530151e3061eb110f2
treeead49a0a0912ea963401a03b47ce19dcc0c2e8d1
parentde9f842c55676a68453cc4160f316b1c1eea865b
[MLIR][Shape] Lower `shape.rank`

Lower `shape.rank` to standard dialect.
A shape's size is the same as the extent of the first and only dimension of the
`tensor<?xindex>` it is represented by.

Differential Revision: https://reviews.llvm.org/D82080
mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir