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

2019-05-16 Thread Segher Boessenkool
Hi Jeff, On Thu, May 16, 2019 at 12:41:16PM -0600, Jeff Law wrote: > For architectures like PPC, we probably don't want to use the loop count > for anything else as it's likely expensive to get data in/out of the the > loop count register. That is part of it. Another part is that it costs extra

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

2019-05-16 Thread Jeff Law
On 5/15/19 2:47 AM, Richard Biener wrote: > On Wed, 15 May 2019, Kewen.Lin wrote: > >> on 2019/5/14 下午3:26, Richard Biener wrote: >>> On Tue, May 14, 2019 at 5:10 AM wrote: From: Kewen Lin Previous version link for background: https://gcc.gnu.org/ml/gcc-patches/2019-04/m

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

2019-05-16 Thread Segher Boessenkool
On Thu, May 16, 2019 at 09:25:49AM +0200, Richard Biener wrote: > On Wed, 15 May 2019, Segher Boessenkool wrote: > > > Otherwise I understand that IVOPTs doesn't properly cost > > > the doloop IV update and conditional branch. > > > > Currently it doesn't even *know* something is or isn't a doloop

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

2019-05-16 Thread Richard Biener
On Wed, 15 May 2019, Segher Boessenkool wrote: > On Wed, May 15, 2019 at 10:47:31AM +0200, Richard Biener wrote: > > Ah, so the key issue is that the doloop IV is "free"? That > > is, it doesn't consume a general register and whatnot? That > > is allocating this IV doesn't really interfere with

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

2019-05-15 Thread Kewen.Lin
on 2019/5/15 下午4:47, Richard Biener wrote: > On Wed, 15 May 2019, Kewen.Lin wrote: > >> on 2019/5/14 下午3:26, Richard Biener wrote: >>> On Tue, May 14, 2019 at 5:10 AM wrote: From: Kewen Lin Previous version link for background: https://gcc.gnu.org/ml/gcc-patches/2019-04/

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

2019-05-15 Thread Segher Boessenkool
On Wed, May 15, 2019 at 10:47:31AM +0200, Richard Biener wrote: > Ah, so the key issue is that the doloop IV is "free"? That > is, it doesn't consume a general register and whatnot? That > is allocating this IV doesn't really interfere with other IVs? That is one half of it, yes. > But can othe

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

2019-05-15 Thread Richard Biener
On Wed, 15 May 2019, Kewen.Lin wrote: > on 2019/5/14 下午3:26, Richard Biener wrote: > > On Tue, May 14, 2019 at 5:10 AM wrote: > >> > >> From: Kewen Lin > >> > >> Previous version link for background: > >> https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html > >> > >> Firstly, it's to call pr

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

2019-05-14 Thread Kewen.Lin
on 2019/5/14 下午3:26, Richard Biener wrote: > On Tue, May 14, 2019 at 5:10 AM wrote: >> >> From: Kewen Lin >> >> Previous version link for background: >> https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html >> >> Firstly, it's to call predict_doloop_p hook to check this >> loop will be transfo

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

2019-05-14 Thread Richard Biener
On Tue, May 14, 2019 at 5:10 AM wrote: > > From: Kewen Lin > > Previous version link for background: > https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html > > Firstly, it's to call predict_doloop_p hook to check this > loop will be transformed to doloop or not, if yes, find > the expected co

[PATCH v2 3/3] Consider doloop cmp use in ivopts

2019-05-13 Thread linkw
From: Kewen Lin Previous version link for background: https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00912.html Firstly, it's to call predict_doloop_p hook to check this loop will be transformed to doloop or not, if yes, find the expected comp iv use and its dependent original iv, set the iv cand