This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Stabilization on the ARM: an unrolling bug


Jeffrey A Law writes:

 > What I think we need to do is avoid unrolling if the loop test code
 > conditionally jumps to the top of the loop more than once.

Yes, this is what my patch attempted to do.  Note that this bug occurs
with most of the targets.

 > Presumably we know the start of the loop exit code, so we can just scan
 > forward from there until the NOTE_INSN_LOOP_END to see how many jumps
 > go back to the start of the loop.

The start of the loop exit code will be after the LOOP_VTOP note or by
the label where we jump into the loop.

What is wrong with just counting the number of uses of the label at the
loop top?  Even if we have multiple labels at the loop top, I've yet to
find a testcase where this approach doesn't work.

Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]