[PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 15:50:55 PDT 2016


rnk requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: include/clang/Driver/Options.td:385
@@ -384,1 +384,3 @@
   HelpText<"CUDA installation path">;
+def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">,
+  Group<f_Group>, Flags<[CC1Option]>,
----------------
I agree it would be simpler, but it's not what we do elsewhere. There's this idea that the -cc1 line is a canonicalized command line, where no-op options are removed, like -fno-exceptions when EH is off by default.

================
Comment at: lib/Frontend/CompilerInvocation.cpp:1567
@@ +1566,3 @@
+  if (Opts.CUDAIsDevice)
+    if (Arg *A = Args.getLastArg(OPT_fcuda_flush_denormals_to_zero,
+                                 OPT_fno_cuda_flush_denormals_to_zero))
----------------
The right idiom for this is:
  Opts.Thing = Args.hasFlag(OPT_fthing, OPT_fno_thing, false);


http://reviews.llvm.org/D18671





More information about the cfe-commits mailing list