diff options
author | Alexey Bader <alexey.bader@intel.com> | 2020-08-25 17:05:19 +0300 |
---|---|---|
committer | Alexey Bader <alexey.bader@intel.com> | 2020-09-29 15:23:50 +0300 |
commit | 9263931fcccdc99000c1de668bea330711333729 (patch) | |
tree | d1ea273ddda1ce8857d40631d2eb0e5176ad5a9f /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | c5a4900e1a00e88df9d6d9bc39594ff8afd0d9b5 (diff) | |
download | llvm-9263931fcccdc99000c1de668bea330711333729.zip llvm-9263931fcccdc99000c1de668bea330711333729.tar.gz llvm-9263931fcccdc99000c1de668bea330711333729.tar.bz2 |
[SYCL] Assume SYCL device functions are convergent
SYCL device compiler (similar to other SPMD compilers) assumes that
functions are convergent by default to avoid invalid transformations.
This attribute can be removed if compiler can prove that function does
not have convergent operations.
Reviewed By: Naghasan
Differential Revision: https://reviews.llvm.org/D87282
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2d008d8..4222433 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2882,7 +2882,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.Coroutines = Opts.CPlusPlus20 || Args.hasArg(OPT_fcoroutines_ts); Opts.ConvergentFunctions = Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) || - Args.hasArg(OPT_fconvergent_functions); + Opts.SYCLIsDevice || + Args.hasArg(OPT_fconvergent_functions); Opts.DoubleSquareBracketAttributes = Args.hasFlag(OPT_fdouble_square_bracket_attributes, |