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: optimized constant vector initializers


On Mon, Mar 31, 2003 at 05:42:58PM -0400, Aldy Hernandez wrote:
> - static int
> ! int
>   is_zeros_p (exp)

Left over from a previous patch?  It's not required here...

> + 	  for (; link; link = TREE_CHAIN (link))
> + 	    output_constant (TREE_VALUE (link), elt_size, align);

You've specified bogus alignment.  Only the first element
should be aligned like this; subsequent ones will use much
less alignment, usually.  You want something like

	unsigned int nalign = min (align, GET_MODE_ALIGNMENT (inner));

	output_constant (TREE_VALUE (link), elt_size, align);
	while ((link = TREE_CHAIN (link)) != NULL)
	  output_constant (TREE_VALUE (link), elt_size, nalign);


r~


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