Support non identity layout map for reshape ops in MemRefToLLVM lowering
authorYi Zhang <cathyzhyi@google.com>
Tue, 19 Apr 2022 00:50:30 +0000 (20:50 -0400)
committerYi Zhang <cathyzhyi@google.com>
Tue, 26 Apr 2022 17:03:53 +0000 (13:03 -0400)
commite1318078a4e160eb723bcbcfcdcc9a1b618f7067
tree29f570678c522ad93455bf1e438ee01650d5b511
parente1836123a7ecb57dcb9a4630c6960478df829fc5
Support non identity layout map for reshape ops in MemRefToLLVM lowering

This change borrows the ideas from `computeExpanded/CollapsedLayoutMap`
and computes the dynamic strides at runtime for the memref descriptors.

Differential Revision: https://reviews.llvm.org/D124001
mlir/include/mlir/Conversion/LLVMCommon/MemRefBuilder.h
mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir