[cfe-commits] [PATCH] Add frontend support for OpenCL build options

Tanya Lattner lattner at apple.com
Mon Nov 29 13:59:17 PST 2010

On Nov 29, 2010, at 12:42 PM, Peter Collingbourne wrote:

> On Tue, Nov 16, 2010 at 10:51:16PM +0000, Peter Collingbourne wrote:
>> Hi,
>> This patch series adds Clang support for all build options listed
>> in section 5.6.3 of the OpenCL 1.1 specification, except for
>> -cl-denorms-are-zero and -cl-no-signed-zeros, which (as far as I can
>> tell) do not have a counterpart in LLVM/Clang.
>> Note that the patches only modify the frontend and not the driver.
>> This was simply because I did not require driver support (I use the
>> frontend directly in my OpenCL implementation, and I suspect other
>> implementations do not need the driver either). Is it fine to add
>> frontend-only support for now?
>> The patches build on my earlier setLangDefaults patch [1].  Please
>> let me know if you would like a series that does not build on this
>> patch.
>> OK to commit?
> Ping.  I also added a test case to patch 3.
> Thanks,
> -- 
> Peter

> <0001-Refactor-optimisation-level-code.patch>
> <0002-Implement-cl-opt-disable.patch>

Looks good to me. However, I noticed that this is now dependent upon the language command line args now being parsed before the codegen args. Is this really necessary?  I don't think we should have a dependency like that. I'd probably just go ahead and assume the person using the option knows they are compiling CL code. 

> <0003-Implement-cl-single-precision-constant.patch>
> <0004-Implement-cl-finite-math-only.patch>
> <0005-Implement-cl-unsafe-math-optimizations.patch>
> <0006-Implement-cl-fast-relaxed-math.patch>
> <0007-Implement-cl-mad-enable.patch><0008-Implement-cl-std.patch>

These look ok to me.

I'm not sure about checking this in without driver support. I suppose thats fine, but Daniel probably has final word since he has done most of the work in that area.


More information about the cfe-commits mailing list