On October 28, 2019 6:18:26 PM GMT+01:00, Segher Boessenkool 
<seg...@kernel.crashing.org> wrote:
>On Mon, Oct 28, 2019 at 09:08:04AM +0100, Richard Biener wrote:
>> On Fri, 25 Oct 2019, Jiufu Guo wrote:
>> > On powerpc64le, for O2 , enable -funroll-loops and limit
>> > PARAM_MAX_UNROLL_TIMES=2 and PARAM_MAX_UNROLLED_INSNS=20, we can
>see >2%
>> > overall improvement for SPEC2017.
>> 
>> Note the behavior with LTO will be surprising (and generally when
>> functions are compiled with different -O level via the optimize
>> attribute).  It's a bad idea to base --param values on the value
>> of a global optimization option that can be set per function
>> (see PR92046).
>> 
>> A better patch would have been to adjust via the target hooks for
>> unroll adjust.
>
>So we should add target hooks for all params, to have them work sanely
>with LTO?

No. There are existing target hooks for the unroller though. 

>What makes params special, different from normal command line options?

They use a different machinery. They should be moved over to the general 
options handling so that per-function settings work. 

Richard. 

>
>Segher

Reply via email to