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

Diego Novillo dnovillo@redhat.com
Thu Jun 5 03:57:00 GMT 2003


On Wed, 2003-06-04 at 23:14, Andrew MacLeod wrote:

> ??  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.
> 
Hmm, every variable has a matching def.  If an SSA name has
empty_stmt_expr as its defining statement then it is either (1) a local
variable used uninitialized or (2) a function argument that's live on
entry.

> 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.
> 
We now connect them to empty_stmt_expr.  Do you want to connect them to
this table so that we can traverse that table to look for live-on-entry
or uninitialized uses?  I guess we could do that.


> It would let us catch things in the out of ssa pass which accidentally
> have no def, much like assign_vars use to do...  
> 
We can do this already without that table you mentioned.  I'm missing
something here.


Diego.



More information about the Gcc mailing list