This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, pretty-ipa] Allow unions to be IPA-SRAed
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Wed, 18 Mar 2009 17:31:02 +0100
- Subject: Re: [PATCH, pretty-ipa] Allow unions to be IPA-SRAed
- References: <20090318162544.GD29689@virgil.suse.cz>
> Hi,
>
> as requested by Honza, the patch below allows unions to be IPA-SRAed.
> I have bootstrapped and tested it on x86_64-linux and will commit it
> tomorrow unless someone objects.
> if ((!is_gimple_reg_type (type)
> && TREE_CODE (type) != RECORD_TYPE
> + && TREE_CODE (type) != UNION_TYPE
> + && TREE_CODE (type) != QUAL_UNION_TYPE
> && TREE_CODE (type) != ARRAY_TYPE)
AGREGATE_TYPE_P tests same condition. Otherwise it is OK.
(even today :))
> || TREE_CODE (type) == FUNCTION_TYPE
> || TYPE_VOLATILE (type))
> continue;
> }
> else if (TREE_CODE (type) != RECORD_TYPE
> + && TREE_CODE (type) != UNION_TYPE
> + && TREE_CODE (type) != QUAL_UNION_TYPE
> && TREE_CODE (type) != ARRAY_TYPE)
Here too.
Honza
> continue;
>
> -
> if (!COMPLETE_TYPE_P (type)
> || TREE_ADDRESSABLE (type)
> || !host_integerp (TYPE_SIZE (type), 1)