Hello,

> On Wednesday 21 December 2005 10:37, Zdenek Dvorak wrote:
> 
> > However, if we instead put a really minimal DECL node (we allocate only
> > one per type, and consisting just of struct tree_common -- 16 bytes) as
> > a SSA_NAME_VAR, things are much easier to get working.
> >
> I see that you are creating a tcc_declaration in your patch, though.  I've 
> been thinking along similar lines, but my idea was to do something similar 
> to what we have with memory tags.  A DECL node derived from decl_minimal 
> that is used when creating *all* compiler temporaries.

decl_minimal still contains some fields that you do not really need for
the single-def (more-or-less) single-use temporaries created by
gimplifier, making them about twice as large as neccessary for this
purpose.

> I like the idea of creating SSA_NAMEs directly for temporaries that are 
> known to be set only once.  However, perhaps this would not be completely 
> necessary if we were to use a really minimal decl node for all 
> temporaries?

The advantage of putting them directly to SSA_NAMEs is that only one
DECL node is needed for each type, whereas if we kept them alone, we
would need one for each definition.  In fact, with some (quite large)
amount of work, it would be possible not to create any DECLs and simply
keeping SSA_NAME_VAR NULL for them -- the main place where this idea
runs into problems is alias analysis that puts a lot of information into
var_anns.

Zdenek

Reply via email to