summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-05-23 20:19:56 +0000
committerJustin Lebar <jlebar@google.com>2016-05-23 20:19:56 +0000
commit91f6f07bb88fd39be8b5e0fd2fdf12903316c662 (patch)
tree4b5dec7b7f5da854be2c0db872c00adb954bfa3a /clang/lib/Frontend/CompilerInvocation.cpp
parent66a891962b3dd66cff48aa27a613e17a3ecae389 (diff)
downloadbcm5719-llvm-91f6f07bb88fd39be8b5e0fd2fdf12903316c662.tar.gz
bcm5719-llvm-91f6f07bb88fd39be8b5e0fd2fdf12903316c662.zip
[CUDA] Add -fcuda-approx-transcendentals flag.
Summary: This lets us emit e.g. sin.approx.f32. See http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin Reviewers: rnk Subscribers: tra, cfe-commits Differential Revision: http://reviews.llvm.org/D20493 llvm-svn: 270484
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index c5f839e6737..852801ab240 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1616,6 +1616,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
if (Opts.CUDAIsDevice && Args.hasArg(OPT_fcuda_flush_denormals_to_zero))
Opts.CUDADeviceFlushDenormalsToZero = 1;
+ if (Opts.CUDAIsDevice && Args.hasArg(OPT_fcuda_approx_transcendentals))
+ Opts.CUDADeviceApproxTranscendentals = 1;
+
if (Opts.ObjC1) {
if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) {
StringRef value = arg->getValue();
OpenPOWER on IntegriCloud