This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Loop clean up fixes
Franz Sirl writes:
> With Clinton's fixes I can bootstrap again, but now I get the same regressions
> as with Alexandre's version:
>
> FAIL: gcc.c-torture/execute/991014-1.c compilation, -O2
This test doesn't have any loops and if I make loop_optimize
immediately return it still segfaults. So I don't think this is due
to my hacks :-)
> What puzzles me about your REG_USERVAR_P patch is that we now abort for the
> !REG_USERVAR_P case, but shouldn't we return 0 for some other cases? As I
> understand it this was the situation before your patch, now the code just
> continues.
Originally we used to abort if the iteration register was one created
during loop optimisation. Then when try_copy_prop was introduced we
could get a new pseudo created by loop_mems propagated into the
iteration register. Bernd's patch changed the abort to a return to
handle this new case, however, this won't allow us to unroll this loop
or to use a BCT on the PPC. AFAICT, any pseudo created by load_mems
will have the REG_USERVAR_P bit set, so I allowed this case to work
but still made the compiler abort if the iteration register was say a
new GIV.
Hopefully as I converted the loop optimiser to use the CFG I can shake
some of this hackery out.
Michael.