[cfe-commits] [PATCH] Add frontend support for OpenCL build options
Tanya Lattner
lattner at apple.com
Mon Nov 29 14:40:25 PST 2010
On Nov 29, 2010, at 2:36 PM, Peter Collingbourne wrote:
> 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.
>
Ah yes, sorry.. read it backwards. :)
> 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.
Yes, this is a bigger issue then. At the very least, there should be a comment or FIXME added if you are going to depend on the options being parsed in a specific order.
-Tanya
>
> Thanks,
> --
> Peter
More information about the cfe-commits
mailing list