[tree-ssa] Merge results as of 2003-05-06
law@redhat.com
law@redhat.com
Thu May 8 19:13:00 GMT 2003
In message <1052408596.13871.2068.camel@p4>, Andrew MacLeod writes:
>> 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.
So I went back and tried to see what objects weren't being marked with
the out_of_ssa_tag that I need marked. Here's an example:
typedef int DItype __attribute__ ((mode (DI)));
typedef union
{
DItype ll;
} DWunion;
DItype
__negdi2 (DItype u)
{
DWunion w;
return w.ll;
}
Which turns into:
__negdi2 (u)
{
union DWunion w;
# BLOCK 0 (k.c:10). PRED: -1. SUCC: -2.
# DItype_3 = VDEF <DItype_2>;
# VUSE <w_1>;
return w.ll;
}
The VAR_DECL for "w" is never marked with the out_of_ssa_tag.
Anyway, we need to look at the VUSE operands to ensure that w gets marked
as being used.
I don't know what further work you've got planned, but at least for now
I don't think we can really rely on the out_of_ssa_tag bit to tell us
what variables were used since we care about variables which are effectively
ignored by the out-of-ssa pass.
jeff
More information about the Gcc
mailing list