This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -funsafe-loop-optimizations
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org, dje at gcc dot gnu dot org
- Date: Sat, 1 Jan 2005 17:46:20 +0100
- Subject: Re: -funsafe-loop-optimizations
- References: <20041231211409.GA22814@atrey.karlin.mff.cuni.cz> <200501011311.27201.paul@codesourcery.com>
Hello,
> > several times some people sounded opinion that in addition to improving
> > analyses in loop optimizer, we might also add a flag that would enable
> > the compiler to assume that the compiled code does not contain loops
> > behaving in "weird" way (loops whose control induction variables
> > overflows, infinite loops with nontrivial exit conditions).
> >
> > I remember several people were against this possibility. Therefore
> > I send the proposal for the patch implementing this flag first here
> > to the gcc list, to give the chance to discuss about it before I try
> > to test and submit it properly (or not).
>
> Does this apply to all "loops" the compiler discovers, or just where explicit
> source language looping constructs are used.
to all.
> If it's the former we should
> IMHO document this as it's probably not obvious to many users, especially
> when combined with inlining, etc.
>
> Also, is this a property could be annotated on a per-loop basis? We know that
> all compiler generated and some user generated loops satisfy these condition.
Not at the moment, but I will work on that.
Zdenek