This is the mail archive of the gcc-patches@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: [PATCH, pretty-ipa] Allow unions to be IPA-SRAed


> 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)


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