This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Merge results as of 2003-05-06
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>,Diego Novillo <dnovillo at redhat dot com>,gcc mailing list <gcc at gcc dot gnu dot org>
- Date: 08 May 2003 11:43:16 -0400
- Subject: Re: [tree-ssa] Merge results as of 2003-05-06
- References: <200305081512.h48FCkET003924@speedy.slc.redhat.com>
On Thu, 2003-05-08 at 11:12, law@redhat.com wrote:
> 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?
Well, those have the out_of_ssa_tag set if they are referenced in a PHI
node.
>
> 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.
>
The out_of_ssa_tag will be set on anything that went through the
partitioning process. That amounts to anything which is a USE, a DEF, or
occurs in a PHI node somewhere. I guess its possible that there will be
variables which are used like this, but not in the partition map. I
suppose you can have all ASM VDEF's added to the partition during
create_ssa_var_map... then they'd have that bit set for sure.
Andrew