[tree-ssa]: Easy way to get default def of a variable?

Andrew MacLeod amacleod@redhat.com
Thu Jun 5 03:40:00 GMT 2003


On Wed, 2003-06-04 at 18:51, Daniel Berlin wrote:
> 
> On Wednesday, June 4, 2003, at 06:22  PM, Andrew MacLeod wrote:
>
> >
> > The first version of all variables, or just the the versions which are 
> > a
> > use of a variable which doesn't have a definition?
> 
> So far, the second.
> No telling i won't run into the first case, however.
> 
> > Meaning that it is
> > live on entry to the function?
> >
> In this case i'm looking at, it's actually one of the function 
> parameters, so yes.
> 

I believe parameters are all we rename right now that would satisfy the
live-on-entry constraint. We've punted on globals and local statics. In
order to rename those and generate correct code in the SSA->normal pass,
I need to know whats live on entry and live on exit to the function to
make sure those SSA versions are coalesced with the global variable.


> If we renamed them in the FUNCTION_DECL's DECL_ARGUMENS temporarily, 
> and dropped the SSA name tree on out-of-ssa, i could just look there.

??  You mean to artificially provide the "first" def?

As Ive stated to Diego on a few occasions, Im uncomfortable with the
whole concept of a use without a def, as all these live on entry
variables are.  Seeing a use of a variable with a matching def seems
wrong.

Maybe we ought to have something for these DEFs to point to. I kinda
like the idea of a table of "defs" which each live on entry variable
points to as its def. Something like that anyway. At least it doesn't
pollute the instruction space.

It would let us catch things in the out of ssa pass which accidentally
have no def, much like assign_vars use to do...  

Andrew



More information about the Gcc mailing list