This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Stabilization on the ARM: an unrolling bug
- To: law at cygnus dot com
- Subject: Re: Stabilization on the ARM: an unrolling bug
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Wed, 13 Jan 1999 21:01:19 +1300 (NZDT)
- Cc: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>, richard dot earnshaw at arm dot com, egcs-patches at cygnus dot com
- References: <"13976.29346.966304.494592"@ongaonga.elec.canterbury.ac.nz><23320.916128204@hurl.cygnus.com>
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.