summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-04-05 18:26:20 +0000
committerJustin Lebar <jlebar@google.com>2016-04-05 18:26:20 +0000
commitd3a44f68854e3e093662117621c607e3361716ec (patch)
tree4cd3258de8a104f97c7b52f829c760cb563d6acf /clang/lib/Frontend/CompilerInvocation.cpp
parentf3bb6c51bca341aaa3af0f2e158184bd5bb04553 (diff)
downloadbcm5719-llvm-d3a44f68854e3e093662117621c607e3361716ec.tar.gz
bcm5719-llvm-d3a44f68854e3e093662117621c607e3361716ec.zip
[CUDA] Add -fcuda-flush-denormals-to-zero.
Summary: Setting this flag causes all functions are annotated with the "nvvm-f32ftz" = "true" attribute. In addition, we annotate the module with "nvvm-reflect-ftz" set to 0 or 1, depending on whether -cuda-flush-denormals-to-zero is set. This is read by the NVVMReflect pass. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18671 llvm-svn: 265435
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 4d97b76d753..ba56665bc84 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1571,6 +1571,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
if (Args.hasArg(OPT_fno_cuda_host_device_constexpr))
Opts.CUDAHostDeviceConstexpr = 0;
+ if (Opts.CUDAIsDevice && Args.hasArg(OPT_fcuda_flush_denormals_to_zero))
+ Opts.CUDADeviceFlushDenormalsToZero = 1;
+
if (Opts.ObjC1) {
if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) {
StringRef value = arg->getValue();
OpenPOWER on IntegriCloud