[mlir] translate memref.reshape ops that have static shapes
authorAshay Rane <ashay@users.noreply.github.com>
Thu, 5 May 2022 20:18:28 +0000 (13:18 -0700)
committerAshay Rane <ashay@users.noreply.github.com>
Thu, 12 May 2022 18:57:20 +0000 (11:57 -0700)
commit5380e30e047bbac9b2cceb69162eb8db1e1a7abf
tree479cf7ff41b56c5e5d6cf3fdda4575180e02f499
parent4128a4a6c219a6c83483d4538a59ed8f523868a5
[mlir] translate memref.reshape ops that have static shapes

This patch references code for translating memref.reinterpret_cast ops
to add translation rules for memref.reshape ops that have a static shape
argument.  Since reshape ops don't have offsets, sizes, or strides, this
patch simply sets the allocated and aligned pointers of the MemRef
descriptor.

Reviewed By: ftynse, cathyzhyi

Differential Revision: https://reviews.llvm.org/D125039
mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
mlir/test/Conversion/MemRefToLLVM/convert-static-memref-ops.mlir