[MLIR] Update the FunctionAndBlockSignatureConverter and NonVoidToVoidReturnOpConvert...
authorEhsan Toosi <ehsan.nadjaran_toosi@dfki.de>
Mon, 4 May 2020 14:06:59 +0000 (16:06 +0200)
committerEhsan Toosi <ehsan.nadjaran_toosi@dfki.de>
Tue, 19 May 2020 15:04:59 +0000 (17:04 +0200)
commit346830051105a849d7fc3ceb246e65acbc0264ae
treef2c14b29abeff76cdc1d31ab12e0fca5fca51cdd
parente4e1080a5837e4a4f38c46b9974f2b2402bb021a
[MLIR] Update the FunctionAndBlockSignatureConverter and NonVoidToVoidReturnOpConverter of Buffer Assignment

Making these two converters more generic. FunctionAndBlockSignatureConverter now
moves only memref results (after type conversion) to the function argument and
keeps other legal function results unchanged. NonVoidToVoidReturnOpConverter is
renamed to NoBufferOperandsReturnOpConverter. It removes only the buffer
operands from the operands of the converted ReturnOp and inserts CopyOps to copy
each buffer to the target function argument.

Differential Revision: https://reviews.llvm.org/D79329
mlir/include/mlir/Transforms/BufferPlacement.h
mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
mlir/lib/Transforms/BufferPlacement.cpp
mlir/test/Transforms/buffer-placement-preparation.mlir [moved from mlir/test/Transforms/buffer-placement-prepration.mlir with 80% similarity]
mlir/test/lib/Transforms/TestBufferPlacement.cpp