aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-04-24 09:10:31 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-04-24 09:11:21 -0500
commitf6657601629005cc9e488f159e310ae4008a25ea (patch)
tree55f41461027dc87a2bc9a763313bb8a2b42fb82b /clang/lib/Frontend/CompilerInvocation.cpp
parent8fa0cfeb61a12ad5ca7830a8228155de32aa7ab2 (diff)
downloadllvm-f6657601629005cc9e488f159e310ae4008a25ea.zip
llvm-f6657601629005cc9e488f159e310ae4008a25ea.tar.gz
llvm-f6657601629005cc9e488f159e310ae4008a25ea.tar.bz2
[Clang] Accept and forward `-fconvergent-functions` in the driver
Currently the `-fconvergent-functions` option is primarily used by GPU toolchains to enforce convergent operations in line with the semantics. This option previously was only supported via `-Xclang` and would show up as unused if passed to the driver. This patch allows the driver to forward it. This is mostly useful for users wishing to target GPU toolchains directly via `--target=` without an offloading runtime. Reviewed By: JonChesterfield, MaskRay Differential Revision: https://reviews.llvm.org/D149019
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index cb29049..34e0e8d 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3731,9 +3731,9 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL
&& Opts.OpenCLVersion == 200);
- Opts.ConvergentFunctions = Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) ||
- Opts.SYCLIsDevice ||
- Args.hasArg(OPT_fconvergent_functions);
+ Opts.ConvergentFunctions = Args.hasArg(OPT_fconvergent_functions) ||
+ Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) ||
+ Opts.SYCLIsDevice;
Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding;
if (!Opts.NoBuiltin)