From 80a9a61ded32df6c7555f13fd7221e92f4d3c6a5 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 30 Aug 2018 14:45:24 +0000 Subject: [OPENMP][NVPTX] Add options -f[no-]openmp-cuda-force-full-runtime. Added options -f[no-]openmp-cuda-force-full-runtime to [not] force use of the full runtime for OpenMP offloading to CUDA devices. llvm-svn: 341073 --- clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index 14845b58620..9dce947e17a 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -1218,7 +1218,8 @@ void CGOpenMPRuntimeNVPTX::emitSPMDEntryHeader( EST.ExitBB = CGF.createBasicBlock(".exit"); // Initialize the OMP state in the runtime; called by all active threads. - bool RequiresFullRuntime = !supportsLightweightRuntime(CGF.getContext(), D); + bool RequiresFullRuntime = CGM.getLangOpts().OpenMPCUDAForceFullRuntime || + !supportsLightweightRuntime(CGF.getContext(), D); llvm::Value *Args[] = { getThreadLimit(CGF, /*IsInSPMDExecutionMode=*/true), /*RequiresOMPRuntime=*/ -- cgit v1.2.3