summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCarlo Bertolli <cbertol@us.ibm.com>2018-02-28 20:48:35 +0000
committerCarlo Bertolli <cbertol@us.ibm.com>2018-02-28 20:48:35 +0000
commit79712097c779f399fccd7fe739d5595829fd19e8 (patch)
tree80d3bb8035074933310f74aa446297a47990e8d4 /clang/lib/Frontend/CompilerInvocation.cpp
parentec03d7e3babb18f222d9b83a04e747f206f416a5 (diff)
downloadbcm5719-llvm-79712097c779f399fccd7fe739d5595829fd19e8.tar.gz
bcm5719-llvm-79712097c779f399fccd7fe739d5595829fd19e8.zip
[OpenMP] Extend NVPTX SPMD implementation of combined constructs
Differential Revision: https://reviews.llvm.org/D43852 This patch extends the SPMD implementation to all target constructs and guards this implementation under a new flag. llvm-svn: 326368
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index a217d356dc4..7e060bbcdf2 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2526,6 +2526,10 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
<< Opts.OMPHostIRFile;
}
+ // set CUDA mode for OpenMP target NVPTX if specified in options
+ Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && T.isNVPTX() &&
+ Args.hasArg(options::OPT_fopenmp_cuda_mode);
+
// Record whether the __DEPRECATED define was requested.
Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro,
OPT_fno_deprecated_macro,
OpenPOWER on IntegriCloud