llvm-project/mlir/lib/Conversion/LLVMCommon
Nicolas Vasilache a664c14001 [mlir][LLVM] Revert bareptr calling convention handling as an argument materialization.
Type conversion and argument materialization are context-free: there is no available information on which op / branch is currently being converted.
As a consequence, bare ptr convention cannot be handled as an argument materialization: it would apply irrespectively of the parent op.
This doesn't typecheck in the case of non-funcOp and we would see cases where a memref descriptor would be inserted in place of the pointer in another memref descriptor.

For now the proper behavior is to revert to a specific BarePtrFunc implementation and drop the blanket argument materialization logic.

This reverts the relevant piece of the conversion to LLVM to what it was before https://reviews.llvm.org/D105880 and adds a relevant test and documentation to avoid the mistake by whomever attempts this again in the future.

Reviewed By: arpith-jacob

Differential Revision: https://reviews.llvm.org/D106495
2021-07-21 22:06:50 +00:00
..
CMakeLists.txt [mlir] factor memref-to-llvm lowering out of std-to-llvm 2021-07-09 14:49:52 +02:00
ConversionTarget.cpp [mlir] replace llvm.mlir.cast with unrealized_conversion_cast 2021-07-16 15:14:09 +02:00
LoweringOptions.cpp
MemRefBuilder.cpp
MemRefDescriptor.h
Pattern.cpp [MLIR][StandardToLLVM] Move `copyUnrankedDescriptors` to pattern 2021-07-12 15:35:07 +02:00
StructBuilder.cpp
TypeConverter.cpp [mlir][LLVM] Revert bareptr calling convention handling as an argument materialization. 2021-07-21 22:06:50 +00:00
VectorPattern.cpp