[PATCH] D21031: [OpenCL] Allow -cl-std and other standard -cl- options in driver

Aaron En Ye Shi via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 11:37:40 PDT 2016


ashi1 marked 6 inline comments as done.
ashi1 added a comment.

F2085685: D21031.patch <http://reviews.llvm.org/F2085685>


================
Comment at: include/clang/Driver/CC1Options.td:670
@@ -669,21 +669,3 @@
 
-def cl_opt_disable : Flag<["-"], "cl-opt-disable">,
-  HelpText<"OpenCL only. This option disables all optimizations. The default is optimizations are enabled.">;
-def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">,
-  HelpText<"OpenCL only. This option does nothing and is for compatibility with OpenCL 1.0">;
-def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">,
-  HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">;
-def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">,
-  HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">;
-def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">,
-  HelpText<"OpenCL only. Generate kernel argument metadata.">;
-def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">,
-  HelpText<"OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable">;
-def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">,
-  HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__">;
-def cl_mad_enable : Flag<["-"], "cl-mad-enable">,
-  HelpText<"OpenCL only. Enable less precise MAD instructions to be generated.">;
-def cl_std_EQ : Joined<["-"], "cl-std=">,
-  HelpText<"OpenCL language standard to compile for">;
-def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">,
-  HelpText<"OpenCL only. Allow denormals to be flushed to zero">;
+//def cl_opt_disable : Flag<["-"], "cl-opt-disable">,
+//  HelpText<"OpenCL only. This option disables all optimizations. The default is optimizations are enabled.">;
----------------
Anastasia wrote:
> Is this code below to be removed?
Yes, I removed the code from CC1Options.td and added replacement in Options.td

================
Comment at: include/clang/Driver/CC1Options.td:673
@@ +672,3 @@
+//def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">,
+//  HelpText<"OpenCL only. This option does nothing and is for compatibility with OpenCL 1.0">;
+//def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">,
----------------
Anastasia wrote:
> This option does nothing and is for compatibility with OpenCL 1.0 -> This option is added for compatibility with OpenCL 1.0.
>  finish with .
> 
> Btw, ideally this option should be deprivcated for CL > 1.0. Could we give diagnostic in this case?
I've added a diagnostic. Can you take a look?


http://reviews.llvm.org/D21031





More information about the cfe-commits mailing list