This is the mail archive of the
mailing list for the GCC project.
Re: [PING] Loop-optimizer patches
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 May 2005 15:33:16 +0200
- Subject: Re: [PING] Loop-optimizer patches
- References: <email@example.com>
> All these older patches are by Zdenek, but if approved I could take care
> of redoing bootstraps and regtests, and applying them:
> merging of equivalent invariants in rtl level invariant motion
there is a minor bug in this version that I found during later tests,
I will try to prepare the fixed version soon.
> reenables loop header predictor
We have agreed with Honza that a better way is to move loop header
copying after the profiling pass, I will try to do this soon as well
(taking into account that I have about 5 patches I need to work
on in the queue now, "soon" may take some time :-( ) There already is some
profile updating code in tree-ssa-loop-ch, so it only needs to be
checked that it behaves sanely, and to run some benchmark to verify that
the pass reordering does not generate any unexpected regressions.
> This is for PR19210. The patch was missing a changelog, so here it is.
> * common.opt (funsafe-loop-optimizations, Wloop-assumptions):
> New flag.
> * loop-iv.c (iv_number_of_iterations): If
> -funsafe-loop-optimizations, assume that no overflows or
> infinite loops occurs with a warning if also -Wloop-assumptions;
> if not, warn if -Wloop-assumptions and gcc cannot optimize a
> loop because of possible overflows or infinite loops.
> * tree-ssa-loop-niter.c (number_of_iterations_cond): Ditto.
> (number_of_iterations_exit): Add a parameter to control
> * tree-ssa-dce.c (find_obviously_necessary_stmts): Assume that
> loops are not infinite if -funsafe-loop-optimizations.
> * doc/invoke.texi (-funsafe-loop-optimizations): Document.
> (-Wloop-assumptions): Document.
Assuming that it works (I think I never really tested the patch, the
version I submitted was just to get some feedback), this would be nice