> Hi, > > On Wed, Jan 08 2020, Jan Hubicka wrote: > >> Hi, > >> > >> On Fri, Jan 03 2020, Martin Liška wrote: > >> > Hi. > >> > > >> > This is similar transformation for IPA passes. This time, > >> > one needs to use opt_for_fn in order to get the right > >> > parameter values. > >> > > >> > @Martin, Honza: > >> > There are last few remaining parameters which should use > >> > opt_for_fn: > >> > > >> > param_ipa_cp_unit_growth > >> > >> So as we discussed, picking this one from one particular node is not > > all right, the above was perhaps confusing, the patch does not pick one > value but keeps picking the maximum growth ratio from each and every > node as it considers cloning opportunities... > > >> what one would expect to happen, but inlining does it too and so anyway: > > > > Inlining does not do that. For each inlining decision it calculcates > > the growth accroding to function it inlines into. So if you set > > unit-growth more for -O3 than for -O2 (as I am just finishing > > benchmarking of) and combine both settings, the -O3 code will be allowed > > to grow unit when -O2 code would not. I think ipa-cp can do the same. > > > > ...and thus I believe the patch actually the patch does the same.
I guess it won't cut cloning -O2 nodes before cloning -O3 nodes? But if that is hard to set up (it may be since it is not done in greedy way as in inline) the patch is OK - it is definitly improvement over what we have right now. Having one param that matters at linktime and rest tha tmatters at compile time would definitly be very confusing. Honza > > Martin >