aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
diff options
context:
space:
mode:
authorTobias Gysi <tobias.gysi@nextsilicon.com>2023-06-27 06:56:01 +0000
committerTobias Gysi <tobias.gysi@nextsilicon.com>2023-06-27 07:26:59 +0000
commitb126ee65fcbb49054e32fd11fdac07279d00f159 (patch)
treebf611124dac000a912975d80746d23908aada31c /mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
parent9b684ecde68c6ba479b02b93b0944f4bc79094d5 (diff)
downloadllvm-b126ee65fcbb49054e32fd11fdac07279d00f159.zip
llvm-b126ee65fcbb49054e32fd11fdac07279d00f159.tar.gz
llvm-b126ee65fcbb49054e32fd11fdac07279d00f159.tar.bz2
[mlir][llvm] Add comdat attribute to functions
This revision adds comdat support to functions. Additionally, it ensures only comdats that have uses are imported/exported and only non-empty global comdat operations are created. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D153739
Diffstat (limited to 'mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp')
-rw-r--r--mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
index 664d077..38b7248 100644
--- a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
+++ b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
@@ -75,8 +75,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, /*cconv*/ LLVM::CConv::C,
- attributes);
+ LLVM::Linkage::External, /*dsoLocal=*/false, /*cconv=*/LLVM::CConv::C,
+ /*comdat=*/nullptr, attributes);
{
// Insert operations that correspond to converted workgroup and private