[cfe-dev] RFC: Clang driver redesign

Ruben Van Boxem vanboxem.ruben at gmail.com
Fri Nov 4 15:47:58 PDT 2011


Op 4 nov. 2011 23:11 schreef "Eric Christopher" <echristo at apple.com> het
volgende:
>
>
> On Nov 4, 2011, at 2:55 PM, Ruben Van Boxem wrote:
>
>> Op 4 nov. 2011 21:51 schreef "Eric Christopher" <echristo at apple.com> het
volgende:
>> >
>> >
>> > On Nov 4, 2011, at 1:08 PM, Matthieu Monrocq wrote:
>> >
>> >> This would also allow implementing a *sane* option syntax, like for
example a hierarchical option parser:
>> >>
>> >> --codegen-stackframe-limit=50
>> >>
>> >> Where "stackframe-limit=50" is dispatched to the "codegen" plugin,
which itself dispatch "limit=50kB" to its stackframe object, which sets its
"limit" attribute to 50000 (for example).
>> >
>> >
>> > There's one particular set of use cases that this brings up that I'd
like to mention:
>> >
>> > "Less knobs for users to use"
>> >
>> > I realize it's an example, and a good way of describing a partial way
of evaluation options, however, the idea behind this option in particular
is something I explicitly don't want to do. I believe we want less knobs,
not more. We don't want the users mucking with things like inlining
heuristics, the size of the stack, and whether they want to unroll 4 loops
or 3. These are the kinds of decisions that the optimizer should be able to
handle and people working on the compiler have their own ways of mucking
with these sorts of options.
>>
>> Wrong; to successfully build the cellspu tblgen files on windows x64,
one had to increase stack size for tblgen not to crash. I'm quite certain
this use case is far from unique. I do agree hiding low level options
casual users shouldn't know about (although they should be well
documented), but not having it is really shooting yourself in the foot..
>>
>>
> Then the port is broken. You shouldn't need a compiler option for this.

Agreed, but that doesn't take away there will always be wanted and
controlled cases where these types of things are required. It would only
limit Clang's power by removing that compiler option interface. And there
will always be compiler bugs, that could be effectively worked around by
using these kinds of options.

Ruben

>
> -eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111104/def22de2/attachment.html>


More information about the cfe-dev mailing list