This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Enable saliasing for structs with arrays
On Fri, 2005-07-22 at 09:58 +0200, Richard Guenther wrote:
> On Thu, 21 Jul 2005, Jan Hubicka wrote:
>
> > > For unions we don't create subvars, as is, I'm looking for an exact
> > Has that changed with your patch?
> > I quite definitly was debugging some issues with subvars on unions ;)
>
> Well, I have that information from existing code:
>
> static unsigned int
> create_variable_info_for (tree decl, const char *name)
> {
> ...
> hasunion = TREE_CODE (decltype) == UNION_TYPE
> || TREE_CODE (decltype) == QUAL_UNION_TYPE;
> if (var_can_have_subvars (decl) && use_field_sensitive && !hasunion)
> {
> push_fields_onto_fieldstack (decltype, &fieldstack, 0, &hasunion);
> if (hasunion)
> {
> VEC_free (fieldoff_s, heap, fieldstack);
> notokay = true;
>
> at least it creates at most one subvar for the union itself, but
> doesn't decompose it.
No, you've got it wrong.
You are confusing the structure var creation code with the structalias
code.
The points-to analyzer globs unions to a single variable.
The structure var creation does not, and handles unions just fine.
Look at tree-ssa-alias.c:create_overlap_variables