aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
diff options
context:
space:
mode:
authorAlexander Batashev <alexbatashev@outlook.com>2022-05-27 09:23:27 +0300
committerAlexander Batashev <alexbatashev@outlook.com>2022-05-27 09:43:31 +0300
commit0252357b3e1e8f6d3bc51ac6d7ac075842b2c956 (patch)
treea73e7e122aa84fd8d3b088fc797a25fedf7bd697 /mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
parenta84026821bf65b312c6752e6d4318419ab3a4f31 (diff)
downloadllvm-0252357b3e1e8f6d3bc51ac6d7ac075842b2c956.zip
llvm-0252357b3e1e8f6d3bc51ac6d7ac075842b2c956.tar.gz
llvm-0252357b3e1e8f6d3bc51ac6d7ac075842b2c956.tar.bz2
[mlir][LLVM] Add support for Calling Convention in LLVMFuncOp
This patch adds support for Calling Convention attribute in LLVM dialect, including enums, custom syntax and import from LLVM IR. Additionally fix import of dso_local attribute. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D126161
Diffstat (limited to 'mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp')
-rw-r--r--mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
index 6cb5a5b..85d1a52 100644
--- a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
+++ b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
@@ -68,7 +68,8 @@ GPUFuncOpLowering::matchAndRewrite(gpu::GPUFuncOp gpuFuncOp, OpAdaptor adaptor,
attributes.emplace_back(kernelAttributeName, rewriter.getUnitAttr());
auto llvmFuncOp = rewriter.create<LLVM::LLVMFuncOp>(
gpuFuncOp.getLoc(), gpuFuncOp.getName(), funcType,
- LLVM::Linkage::External, /*dsoLocal*/ false, attributes);
+ LLVM::Linkage::External, /*dsoLocal*/ false, /*cconv*/ LLVM::CConv::C,
+ attributes);
{
// Insert operations that correspond to converted workgroup and private