On Thu, Jun 27, 2019 at 5:23 AM Bill Schmidt <[email protected]> wrote: > > Hi, > > We've done some experimenting and realized that the subject option almost > always provide improved performance for Power when the loop unroller is > enabled. So this patch turns that flag on by default for us. > > Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. > Is this OK for trunk?
I guess it creates more freedom for combine (more single-uses) and register allocation. I wonder in which cases this might pessimize things? I guess the pre-RA scheduler might make RAs life harder with creating overlapping life-ranges. I guess you didn't actually investigate the nature of the improvements you saw? Do we want to adjust the flags documentation, saying whether this is enabled by default depends on the target (or even list them)? Thanks, Richard. > Thanks! > Bill > > > 2019-06-27 Bill Schmidt <[email protected]> > > * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable > -fvariable-expansion-in-unroller by default. > > > Index: gcc/config/rs6000/rs6000.c > =================================================================== > --- gcc/config/rs6000/rs6000.c (revision 272719) > +++ gcc/config/rs6000/rs6000.c (working copy) > @@ -3616,6 +3616,11 @@ rs6000_option_override_internal (bool global_init_ > && !global_options_set.x_flag_asynchronous_unwind_tables) > flag_asynchronous_unwind_tables = 1; > > + /* -fvariable-expansion-in-unroller is a win for POWER whenever the > + loop unroller is active. It is only checked during unrolling, so > + we can just set it on by default. */ > + flag_variable_expansion_in_unroller = 1; > + > /* Set the pointer size. */ > if (TARGET_64BIT) > { >
