https://github.com/ajarmusch updated https://github.com/llvm/llvm-project/pull/65483:
>From 5a56cffb1e53e8c7415bf468a7edfb464fbc08a0 Mon Sep 17 00:00:00 2001 From: Aaron Jarmusch <jarmu...@udel.edu> Date: Wed, 6 Sep 2023 13:56:16 +0000 Subject: [PATCH 1/2] [Clang][OpenMP] Clang adding the addrSpace according to DataLayout fix --- clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index 1ec9bb3d523471..927cc5215d9a1e 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -3362,6 +3362,8 @@ Address CGOpenMPRuntimeGPU::getAddressOfLocalVariable(CodeGenFunction &CGF, break; case OMPAllocateDeclAttr::OMPLargeCapMemAlloc: case OMPAllocateDeclAttr::OMPCGroupMemAlloc: + if (VD->hasGlobalStorage()) + AS = getLangASFromTargetAS(CGF.CGM.getModule().getDataLayout().getDefaultGlobalsAddressSpace()); break; } llvm::Type *VarTy = CGF.ConvertTypeForMem(VD->getType()); >From a2403c43f6841fed44412fbf178808d3962c12d1 Mon Sep 17 00:00:00 2001 From: Aaron Jarmusch <jarmu...@udel.edu> Date: Wed, 6 Sep 2023 14:48:05 +0000 Subject: [PATCH 2/2] fixup! [Clang][OpenMP] Clang adding the addrSpace according to DataLayout fix --- clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index 927cc5215d9a1e..2e022b5cdf762f 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -3362,8 +3362,7 @@ Address CGOpenMPRuntimeGPU::getAddressOfLocalVariable(CodeGenFunction &CGF, break; case OMPAllocateDeclAttr::OMPLargeCapMemAlloc: case OMPAllocateDeclAttr::OMPCGroupMemAlloc: - if (VD->hasGlobalStorage()) - AS = getLangASFromTargetAS(CGF.CGM.getModule().getDataLayout().getDefaultGlobalsAddressSpace()); + AS = getLangASFromTargetAS(CGF.CGM.getModule().getDataLayout().getDefaultGlobalsAddressSpace()); break; } llvm::Type *VarTy = CGF.ConvertTypeForMem(VD->getType()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits