> On Jun 8, 2018, at 2:29 PM, Jim Wilson <j...@sifive.com> 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 replaced with a new RTL loop optimizer. When
> the old one was written, m68k was a major target, and the dbra optimization
> was written for it. When the new one was written, m68k was not a major
> target, and this support was written differently. We now have doloop_begin
> and doloop_end patterns that do almost the same thing, and can be created by
> the loop-doloop.c code.
>
> There is a section in the internals docs that talks about this.
> https://gcc.gnu.org/onlinedocs/gccint/Looping-Patterns.html
>
> The fact that we still have decrement_and_branch_until_zero references in
> docs and target md files looks like a bug. The target md files should use
> doloop patterns instead, and the doc references should be dropped.
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.
Meanwhile, yes, it looks like there is a documentation bug. I can clean that
up. It's more than a few lines, but does that qualify for an "obvious" change?
paul