diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-24 09:10:31 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-04-24 09:11:21 -0500 |
commit | f6657601629005cc9e488f159e310ae4008a25ea (patch) | |
tree | 55f41461027dc87a2bc9a763313bb8a2b42fb82b /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8fa0cfeb61a12ad5ca7830a8228155de32aa7ab2 (diff) | |
download | llvm-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.cpp | 6 |
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) |