Re: [OpenCL patch] misc frontend and driver changes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [OpenCL patch] misc frontend and driver changes

Anton Lokhmotov
Hi Tanya,

Couple of comments on the patch.

>  def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
>  def ImplicitInt : DiagGroup<"implicit-int">;
> +def ImplicitLibFuncDeclare :
ImplicitLibFuncDeclare -> ImplicitLibraryFunctionDeclare or

> +  unsigned SinglePrecConst : 1; // For OpenCL treat double fp constant
> +                                // as single fp.
There's already a field called SinglePrecisionConstants (and I like the full
name better).

> +  unsigned DenormsZero     : 1; // OpenCL allows denorms to be flush to
flush -> flushed
DenormsZero -> DenormsAreZero ?

> +def cl_denorms_are_zero : Flag<"-cl-denorms-are-zero">,
> +  HelpText<"Single precision denorms may be flush to zero">;
flush -> flushed
The specification actually says: " If specified as a build option, the
single precision denormalized numbers may be flushed to zero; double
precision denormalized numbers may also be flushed to zero if the optional
extension for double precision is supported." So I think the help message
should say: "Denormalized numbers may be flushed to zero."

> +  if (LangOpts.OpenCL)
> +    Builder.defineMacro("__OPENCL__");
> +  
The specification defines __OPENCL_VERSION__, CL_VERSION_1_0 and
CL_VERSION_1_1 (and couple of others) but not this macro?

Do you plan to add handling of -cl-opt-disable, -cl-no-signed-zeros,
-cl-unsafe-math-optimizations, -cl-finite-math-only and -cl-std=?

Best regards,

cfe-dev mailing list
[hidden email]