Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread Jan Hubicka
> On Mon, Oct 26, 2020 at 10:14 AM Jan Hubicka wrote: > > > > > > > > > > For example you had patch that limited "rep cmpsb" expansion for > > > > -minline-all-stringops. Now the conditions could be > > > > -minline-all-stringops || optimize_insn_for_size () == OPTIMIZE_SIZE_MAX > > > > since it

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread H.J. Lu via Gcc-patches
On Mon, Oct 26, 2020 at 10:14 AM Jan Hubicka wrote: > > > > > > > For example you had patch that limited "rep cmpsb" expansion for > > > -minline-all-stringops. Now the conditions could be > > > -minline-all-stringops || optimize_insn_for_size () == OPTIMIZE_SIZE_MAX > > > since it is still usefu

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread Jan Hubicka
> > > > For example you had patch that limited "rep cmpsb" expansion for > > -minline-all-stringops. Now the conditions could be > > -minline-all-stringops || optimize_insn_for_size () == OPTIMIZE_SIZE_MAX > > since it is still useful size optimization. > > > > I am not sure if you had other chang

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread H.J. Lu via Gcc-patches
On Mon, Oct 26, 2020 at 7:36 AM Jan Hubicka wrote: > > > On Mon, Oct 26, 2020 at 7:23 AM Jan Hubicka wrote: > > > > > > Hi, > > > this patch implements thre two-state optimize_for_size predicates, so > > > with -Os > > > and with profile feedback for never executed code it returns > > > OPTIMIZ

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread Jan Hubicka
> On Mon, Oct 26, 2020 at 7:23 AM Jan Hubicka wrote: > > > > Hi, > > this patch implements thre two-state optimize_for_size predicates, so with > > -Os > > and with profile feedback for never executed code it returns > > OPTIMIZE_SIZE_MAX > > while in cases we decide to optimize for size based o

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread Jan Hubicka
> On 10/26/20 3:22 PM, Jan Hubicka wrote: > > Hi, > > this patch implements thre two-state optimize_for_size predicates, so with > > -Os > > and with profile feedback for never executed code it returns > > OPTIMIZE_SIZE_MAX > > while in cases we decide to optimize for size based on branch predict

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread Martin Liška
On 10/26/20 3:22 PM, Jan Hubicka wrote: Hi, this patch implements thre two-state optimize_for_size predicates, so with -Os and with profile feedback for never executed code it returns OPTIMIZE_SIZE_MAX while in cases we decide to optimize for size based on branch prediction logic it return OPTIMI

Re: Implement three-level optimize_for_size predicates

2020-10-26 Thread H.J. Lu via Gcc-patches
On Mon, Oct 26, 2020 at 7:23 AM Jan Hubicka wrote: > > Hi, > this patch implements thre two-state optimize_for_size predicates, so with -Os > and with profile feedback for never executed code it returns OPTIMIZE_SIZE_MAX > while in cases we decide to optimize for size based on branch prediction lo