[mlir][LLVM] Add an attribute to control use of bare-pointer calling convention.
authorMahesh Ravishankar <ravishankarm@google.com>
Thu, 6 Apr 2023 16:10:45 +0000 (16:10 +0000)
committerMahesh Ravishankar <ravishankarm@google.com>
Thu, 6 Apr 2023 16:19:56 +0000 (16:19 +0000)
commit162f7572067d7d2d70202f5ff42532adf6f75517
tree2cfc2d8ea62c1f3a8997a64df26114ba765f0691
parentcf62adbbd83e593a893a27234636b939870c9658
[mlir][LLVM] Add an attribute to control use of bare-pointer calling convention.

Currently the use of bare pointer calling convention is controlled
globally through use of an option in the `LLVMTypeConverter`. To allow
more fine-grained control use an attribute on a function to drive the
calling convention to use.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D147494
mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp
mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
mlir/test/Conversion/FuncToLLVM/calling-convention.mlir
mlir/test/Conversion/FuncToLLVM/func-memref-return.mlir