summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-08-30 14:45:24 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-08-30 14:45:24 +0000
commit80a9a61ded32df6c7555f13fd7221e92f4d3c6a5 (patch)
treedc2e3c1a9f610cffa01a2592937a1646c3b878d3 /clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
parentaf96112ec625e303fe5d62cd85f9a778d492fd8e (diff)
downloadbcm5719-llvm-80a9a61ded32df6c7555f13fd7221e92f4d3c6a5.tar.gz
bcm5719-llvm-80a9a61ded32df6c7555f13fd7221e92f4d3c6a5.zip
[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
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp3
1 files changed, 2 insertions, 1 deletions
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=*/
OpenPOWER on IntegriCloud