Re: decrement_and_branch_until_zero pattern

2018-07-05 Thread Paul Koning
> On Jun 8, 2018, at 6:16 PM, Jim Wilson wrote: > > On Fri, Jun 8, 2018 at 1:12 PM, Paul Koning wrote: >> Thanks. I saw those sections and interpreted them as support for signal >> processor style fast hardware loops. If they can be adapted for dbra type >> looping, great. I'll give that

Re: decrement_and_branch_until_zero pattern

2018-06-08 Thread Jim Wilson
On Fri, Jun 8, 2018 at 1:12 PM, Paul Koning wrote: > Thanks. I saw those sections and interpreted them as support for signal > processor style fast hardware loops. If they can be adapted for dbra type > looping, great. I'll give that a try. The rs6000 port uses it for bdnz (branch decrement

Re: decrement_and_branch_until_zero pattern

2018-06-08 Thread Paul Koning
> On Jun 8, 2018, at 2:29 PM, Jim Wilson wrote: > > On 06/08/2018 06:21 AM, Paul Koning wrote: >> Interesting. The ChangeLog doesn't give any background. I suppose I should >> plan to approximate the effect of this pattern with a define-peephole2 ? > > The old RTL loop optimizer was replac

Re: decrement_and_branch_until_zero pattern

2018-06-08 Thread Jim Wilson
On 06/08/2018 06:21 AM, Paul Koning wrote: Interesting. The ChangeLog doesn't give any background. I suppose I should plan to approximate the effect of this pattern with a define-peephole2 ? The old RTL loop optimizer was replaced with a new RTL loop optimizer. When the old one was written,

Re: decrement_and_branch_until_zero pattern

2018-06-08 Thread Paul Koning
> On Jun 8, 2018, at 6:59 AM, Andreas Schwab wrote: > > On Jun 07 2018, Paul Koning wrote: > >> None of these seem to use that loop optimization, with -O2 or -Os. Did I >> miss some magic switch to turn on something else that isn't on by default? >> Or is this a feature that was broken long

Re: decrement_and_branch_until_zero pattern

2018-06-08 Thread Andreas Schwab
On Jun 07 2018, Paul Koning wrote: > None of these seem to use that loop optimization, with -O2 or -Os. Did I > miss some magic switch to turn on something else that isn't on by default? > Or is this a feature that was broken long ago and not noticed? If so, any > hints where I might look for a

decrement_and_branch_until_zero pattern

2018-06-07 Thread Paul Koning
I'm a bit puzzled by the decrement_and_branch_until_zero looping pattern. The manual described it as a named pattern, through from the description it isn't clear that it's referenced by name. I see those only in m68k and pa. There are similar looking but anonymous patterns in pdp11 and vax, s