This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR35607, another revenge of invariant addresses (ivopts)
- From: Richard Guenther <rguenther at suse dot de>
- To: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, dnovillo at google dot com
- Date: Mon, 17 Mar 2008 00:09:29 +0100 (CET)
- Subject: Re: [PATCH] Fix PR35607, another revenge of invariant addresses (ivopts)
- References: <Pine.LNX.4.64.0803161627030.4133@zhemvz.fhfr.qr> <20080316221835.GA2146@kam.mff.cuni.cz> <Pine.LNX.4.64.0803162325280.4133@zhemvz.fhfr.qr> <20080316223035.GA5424@kam.mff.cuni.cz> <Pine.LNX.4.64.0803162331260.4133@zhemvz.fhfr.qr> <20080316224602.GB5424@kam.mff.cuni.cz> <Pine.LNX.4.64.0803162349230.4133@zhemvz.fhfr.qr> <Pine.LNX.4.64.0803162355470.4133@zhemvz.fhfr.qr> <Pine.LNX.4.64.0803170001160.4133@zhemvz.fhfr.qr> <20080316230615.GA10338@kam.mff.cuni.cz>
On Mon, 17 Mar 2008, Zdenek Dvorak wrote:
> Hi,
>
> > On Sun, 16 Mar 2008, Richard Guenther wrote:
> >
> > > On Sun, 16 Mar 2008, Richard Guenther wrote:
> > >
> > > > On Sun, 16 Mar 2008, Zdenek Dvorak wrote:
> > > > > I am more inclined to sacrifice the simplicity of that check (see the
> > > > > patch below). Is that known to cause problems?
> > > >
> > > > Previously that was rejected as being too expensive (if I remember
> > > > correctly Eric proposed sth similar last year). (it also looks
> > > > somewhat incomplete as it doesn't handle all handled_component_refs,
> > > > also indirect_refs are never invariant, also IMHO for ARRAY_REF
> > > > indices we should require a literal constant (another nested
> > > > &foo[0] should not be allowed)).
> > >
> > > http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00095.html
-->
> > On 7/4/07 6:24 PM, Eric Botcazou wrote:
> > > OK, my understanding is that is_gimple_min_invariant as currently
> > written is
> > > correct as "non-recursive" predicate (for the updated grammar), i.e.
> > during
> > > gimplification."
> >
> > this seems to be incorrect - re-gimplifying of &foo[(int)a_2] does
> > not result in any gimplification work as is_gimple_min_invariant is
> > used to check if recursing is required. So this creates a
> > chicken-and-egg problem here (and maybe is the point that needs
> > fixing?)
<---
> maybe you wanted to send this to the list, or cc Eric? I certainly
> agree with this statement,
Indeed. Copied the list now. And Diego who had much to say about
gimple grammar in the threads referenced above (read between the
two arrows ;).
Richard.