This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Valid gimple for MEM_REF
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Sat, 3 Mar 2007 23:06:12 +0100
- Subject: Re: Valid gimple for MEM_REF
- References: <de8d50360703031336p7195c91fr67969007ef434030@mail.gmail.com>
Hello,
> I noticed that gcc.dg/tree-ssa/loop-19.c was failing on both
> powerpc-linux-gnu and powerpc64-linux-gnu:
> FAIL: gcc.dg/tree-ssa/loop-19.c scan-tree-dump-times MEM.(base: &|symbol:
> )a, 2
> FAIL: gcc.dg/tree-ssa/loop-19.c scan-tree-dump-times MEM.(base: &|symbol:
> )c, 2
>
> The reason why they are failing is because we produce:
> MEM[base: (double *) &c, index: ivtmp.34] = MEM[base: (double *) &a,
> index: ivtmp.34];
> Which does not match the regex as there is a cast there.
> Now the real question comes down to, is the following valid gimple
> that IV-OPTS produces:
> MEM[base: (double *) &a, index: ivtmp.34_12];
>
> base is now a non gimple invariant but instead is a full expression.
> If we decide to do any other optimizations with MEM_REF, we might run
> into more of these issues?
>
> So what are the constraints on MEM_REF's base argument, is it a simple
> expression (SSA_name or invariant) or can it be a complex expression?
only gimple_vals (name or invariant). However, the expressions are
matched in final_cleanup dump (after out-of-ssa and ter), so this no
longer is the case. I think just the regular expressions need to be
updated.
Zdenek