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

Peter Collingbourne peter at pcc.me.uk
Mon Nov 29 14:36:55 PST 2010


Hi Tanya,

On Mon, Nov 29, 2010 at 01:59:17PM -0800, Tanya Lattner wrote:
> > <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. 

The problem is that the default for OpenCL is to enable optimisations
(see spec s5.6.3.3), so the CodeGen arg parser needs to know the
language to determine the default optimisation level.

I suppose this reflects a larger architectural issue with frontend's
arg parser, but I'm not sure what the long term solution to that
would be.

Thanks,
-- 
Peter



More information about the cfe-commits mailing list