diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-08-09 20:10:18 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2016-08-09 20:10:18 +0000 |
commit | 0221f4a136a57a2db2193f03975dab0464600ba0 (patch) | |
tree | 4213ed0477b51aab9aa07ec2e69cf0451f6e62cb /lib/Frontend/CompilerInvocation.cpp | |
parent | 864b7d21ba3baf85089a6117361e3afbe04664c6 (diff) | |
download | clang-0221f4a136a57a2db2193f03975dab0464600ba0.tar.gz |
[OpenCL] Handle -cl-fp32-correctly-rounded-divide-sqrt
Let the driver pass the option to frontend. Do not set precision metadata for division instructions when this option is set. Set function attribute "correctly-rounded-divide-sqrt-fp-math" based on this option.
Differential Revision: https://reviews.llvm.org/D22940
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index bbb7f2b735..e19b612b6e 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -572,6 +572,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.NoSignedZeros = (Args.hasArg(OPT_fno_signed_zeros) || Args.hasArg(OPT_cl_no_signed_zeros)); Opts.FlushDenorm = Args.hasArg(OPT_cl_denorms_are_zero); + Opts.CorrectlyRoundedDivSqrt = + Args.hasArg(OPT_cl_fp32_correctly_rounded_divide_sqrt); Opts.ReciprocalMath = Args.hasArg(OPT_freciprocal_math); Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss); Opts.BackendOptions = Args.getAllArgValues(OPT_backend_option); |