Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-23 Thread Richard Biener
On Tue, 23 Jul 2019, Kewen.Lin wrote: > on 2019/7/22 下午3:18, Richard Biener wrote: > > On Mon, 22 Jul 2019, Segher Boessenkool wrote: > > > >> Hi! > >> > >> (Maybe I am missing half of the discussion -- sorry if so). > >> > >> I think we should have a new iv for just the doloop (which can have th

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-23 Thread Richard Biener
On Mon, 22 Jul 2019, Segher Boessenkool wrote: > On Mon, Jul 22, 2019 at 09:18:10AM +0200, Richard Biener wrote: > > On Mon, 22 Jul 2019, Segher Boessenkool wrote: > > > > > Hi! > > > > > > (Maybe I am missing half of the discussion -- sorry if so). > > > > > > I think we should have a new iv f

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-22 Thread Kewen.Lin
Hi Segher, on 2019/7/23 上午5:43, Segher Boessenkool wrote: > On Mon, Jul 22, 2019 at 09:18:10AM +0200, Richard Biener wrote: >> On Mon, 22 Jul 2019, Segher Boessenkool wrote: >> >>> Hi! >>> >>> (Maybe I am missing half of the discussion -- sorry if so). >>> >>> I think we should have a new iv for j

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-22 Thread Kewen.Lin
on 2019/7/22 下午3:18, Richard Biener wrote: > On Mon, 22 Jul 2019, Segher Boessenkool wrote: > >> Hi! >> >> (Maybe I am missing half of the discussion -- sorry if so). >> >> I think we should have a new iv for just the doloop (which can have the >> same starting value and step and type as another i

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-22 Thread Segher Boessenkool
On Mon, Jul 22, 2019 at 09:18:10AM +0200, Richard Biener wrote: > On Mon, 22 Jul 2019, Segher Boessenkool wrote: > > > Hi! > > > > (Maybe I am missing half of the discussion -- sorry if so). > > > > I think we should have a new iv for just the doloop (which can have the > > same starting value a

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-22 Thread Richard Biener
On Mon, 22 Jul 2019, Segher Boessenkool wrote: > Hi! > > (Maybe I am missing half of the discussion -- sorry if so). > > I think we should have a new iv for just the doloop (which can have the > same starting value and step and type as another iv). > > Has this been considered? I was also sugg

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-21 Thread Kewen.Lin
Hi Segher, on 2019/7/22 下午2:26, Segher Boessenkool wrote: > Hi! > > (Maybe I am missing half of the discussion -- sorry if so). > > I think we should have a new iv for just the doloop (which can have the > same starting value and step and type as another iv). > > Has this been considered? > >

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-21 Thread Segher Boessenkool
Hi! (Maybe I am missing half of the discussion -- sorry if so). I think we should have a new iv for just the doloop (which can have the same starting value and step and type as another iv). Has this been considered? Segher

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-21 Thread Kewen.Lin
Hi Bin, on 2019/7/21 上午11:07, Bin.Cheng wrote: > On Wed, Jun 19, 2019 at 7:47 PM Kewen.Lin wrote: >> >> Hi all, >> >> This is the following patch after >> https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00910.html >> >> Main steps: >> 1) Identify the doloop cmp type iv use and record its bind_ca

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-07-20 Thread Bin.Cheng
On Wed, Jun 19, 2019 at 7:47 PM Kewen.Lin wrote: > > Hi all, > > This is the following patch after > https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00910.html > > Main steps: > 1) Identify the doloop cmp type iv use and record its bind_cand (explain it > later). > 2) Set zero cost for pairs b

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-06-20 Thread Kewen.Lin
Hi, Sorry, the previous patch is incomplete. New one attached. Sorry for inconvenience. on 2019/6/20 下午8:08, Kewen.Lin wrote: > Hi Segher, > >> On Wed, Jun 19, 2019 at 07:47:34PM +0800, Kewen.Lin wrote: >>> +/* Return true if count register for branch is supported. */ >>> + >>> +static bool >>

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-06-20 Thread Kewen.Lin
Hi Segher, > On Wed, Jun 19, 2019 at 07:47:34PM +0800, Kewen.Lin wrote: >> +/* Return true if count register for branch is supported. */ >> + >> +static bool >> +rs6000_have_count_reg_decr_p () >> +{ >> + return flag_branch_on_count_reg; >> +} > > rs6000 unconditionally supports these instructi

Re: [PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-06-20 Thread Segher Boessenkool
Hi Kewen, On Wed, Jun 19, 2019 at 07:47:34PM +0800, Kewen.Lin wrote: > +/* Return true if count register for branch is supported. */ > + > +static bool > +rs6000_have_count_reg_decr_p () > +{ > + return flag_branch_on_count_reg; > +} rs6000 unconditionally supports these instructions, not just

[PATCH v3 3/3] PR80791 Consider doloop cmp use in ivopts

2019-06-19 Thread Kewen.Lin
Hi all, This is the following patch after https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00910.html Main steps: 1) Identify the doloop cmp type iv use and record its bind_cand (explain it later). 2) Set zero cost for pairs between this use and any iv cand. 3) IV cand set selecting algorith