This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Merge results as of 2003-05-06


In message <1052398571.13871.1835.camel@p4>, Andrew MacLeod writes:
 >On Thu, 2003-05-08 at 03:10, law@redhat.com wrote:
 >> In message <wvly91i53p6.fsf@prospero.boston.redhat.com>, Jason Merrill writ
 >es:
 >
 >>  >A simple solution may just be to disable all the temp_slots management co
 >de
 >>  >when we're using the tree optimizers.  A better solution would be to fix
 >>  >the temp_slots data structure so that we don't keep slogging through the
 >>  >whole list when we're only interested in slots from a particular level.
 >> Yup.  We also want to eliminate the variables we don't actually use.  Gimpl
 >e
 >> likes to create lots of temporaries.  Many of them can goaway as a result
 >> of our optimizers.
 >> 
 >
 >And we know when we rewrite out of SSA exactly which ones have been
 >used. In fact, the out_of_ssa_tag has been set on all variables which
 >are actually used in the function. Anything not set hasn't been
 >referenced.
What about variables which only appear in VUSE/VDEFs -- like variables
used/set by asms?

One of the things I found while working on this code was that if we have
to make a separate pass over the tree structures to mark used variables
that the benefits of removing these variables is entirely offset by the
cost to walk over the tree structures the extra time.

This naturally led me to look at collecting use information during
the out-of-ssa pass since it already has to walk over all the tree
structures.

So what I do is set my used bit during the walk over the tree structures
that occurs in create_ssa_var_map.    At first I only marked variables
which appeared as a use or def.  But I quickly ran into variables which
appeared only in vuse/vdefs such as operands to asms, so I have to walk
and mark the virtual operands as well.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]