This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA usage question
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Diego Novillo <dnovillo at redhat dot com>,Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 7 Jun 2004 17:07:20 +0100
- Subject: Re: SSA usage question
- Organization: CodeSourcery
- References: <10406071522.AA10473@vlsi1.ultra.nyu.edu> <1086622830.6145.68.camel@localhost.localdomain>
On Monday 07 June 2004 16:40, Diego Novillo wrote:
> On Mon, 2004-06-07 at 11:22, Richard Kenner wrote:
> > So, you want a reference like 'a[3]' to show up as 'a[3,v,x]' where
> > 'v' is TYPE_MIN_VALUE and 'x' is TYPE_SIZE_UNIT? Would 'v' and 'x' be
> > set sometime before the reference?
> >
> > I missed your last question.
> >
> > By "set", do you mean when they get set into the ARRAY_REF or do you
> > mean when the value is assigned to them during execution?
>
> Assigned to. ie, something like:
>
> x = ...
> v = ...
> ... = a[3,x,v]
>
>
> > For the former, they'll get set during gimplification. And that's also
> > related to the answer to the latter: gimplification will generate the
> > assignment of those variable to whatever expression they need to have.
>
> OK, then things should work. How will this added information affect the
> optimizers? Isn't this information about TYPE_MIN_VALUE and
> TYPE_SIZE_UNIT already expressed in the TREE_TYPE of the ARRAY_REF? Why
> are these attributes replicated in every ARRAY_REF? These things can
> change from reference to reference? That is, given the array 'a' above,
> will every reference to 'a' use a potentially different 'x' and 'v'?
We need something like this for fortran. The values can change from one
reference to the next.
Isn't it fairly trivial to substitute the lower bound during gimplification?
ie. the above becomes
... = a[3 - x, v]
Paul