diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2020-06-22 15:04:58 -0400 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2020-06-25 08:25:24 -0400 |
commit | 32ea3397bec820f98f0b77ca37244142ce700207 (patch) | |
tree | 93acddbd3b953e4ad3962b0339971d9cf81dfd0d /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f14457f5d8befc275f288ba7b7c093f09f79536c (diff) | |
download | llvm-32ea3397bec820f98f0b77ca37244142ce700207.zip llvm-32ea3397bec820f98f0b77ca37244142ce700207.tar.gz llvm-32ea3397bec820f98f0b77ca37244142ce700207.tar.bz2 |
[OPENMP]Dynamic globalization for parallel target regions.
Summary:
Added support for dynamic memory allocation for globalized variables in
case if execution of target regions in parallel is required.
Reviewers: jdoerfert
Subscribers: jholewinski, yaxunl, guansong, sstefan1, cfe-commits, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82324
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index d5528e3..8bd248c 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3195,6 +3195,12 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN()) && Args.hasArg(options::OPT_fopenmp_cuda_mode); + // Set CUDA support for parallel execution of target regions for OpenMP target + // NVPTX/AMDGCN if specified in options. + Opts.OpenMPCUDATargetParallel = + Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN()) && + Args.hasArg(options::OPT_fopenmp_cuda_parallel_target_regions); + // Set CUDA mode for OpenMP target NVPTX/AMDGCN if specified in options Opts.OpenMPCUDAForceFullRuntime = Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN()) && |