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? What makes params special, different from normal command line options? Segher