On Thu, May 19, 2011 at 11:17 AM, Andi Kleen <a...@firstfloor.org> wrote:
> On Thu, May 19, 2011 at 11:10:24AM -0700, Xinliang David Li wrote:
>> On Thu, May 19, 2011 at 11:04 AM, Andi Kleen <a...@firstfloor.org> wrote:
>> > davi...@google.com (David Li) writes:
>> >
>> >> -fdisable-tree-ccp1    <--- disable ccp1 for all functions
>> >> -fenable-tree-cunroll=1   <--- enable complete unroll for the function
>> >>                            whose cgraphnode uid is 1
>> >> -fdisable-rtl-gcse2=1:100,300,400:1000   <-- disable gcse2 for
>> >>                                            functions at the following
>> >>                                             ranges [1,1], [300,400],
>> >> and [400,1000]
>> >
>> > How are the ranges defined? I doubt numbers are a good interface here
>> > to specify functions.
>>
>> The numbers are cgraph uids for the functions. The form that takes the
>> range is mainly for developers who use scripts to auto search (bug
>> triaging and optimization space traverse).
>
> How about function names?

Not so easy for things like binary search.

>
>
>> > This would be better done with #pragmas?
>>
>> This is not good for automation. However, I do plan (later after this
>
> Why not? It should be easy enough to write a script to add such
> pragmas given a dwarf2 symbol->file:line dump

This may require changes many many sources files as compared to a
simple command line tweak -- for most of the cases, you don't even
need to know the id ranges, and can be blindly set to a large initial
value.

>
> I think pragmas would be a lot more useful for non compiler developers.
>

As compared with the -fdisable-tree-xxx=func1,func2?

The semantics of the pragma is also in question -- does it apply to
all inline instances of the function with pragma or just the emitted
instance?

(The pragma scheme can be implemented independently if it is considered useful).

Thanks,

David


> -Andi
>

Reply via email to