[OpenCL patch] misc frontend and driver changes

Hi Tanya,

Couple of comments on the patch.

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

DiagGroup<"implicit-lib-function-declaration">;
ImplicitLibFuncDeclare -> ImplicitLibraryFunctionDeclare or
ImplicitLibFunctionDeclare?

+ 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

zero.
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,
Anton.