[patch, ARM] Align arrays/structs and unions of small data types to a word boundary.

Richard Earnshaw rearnsha@arm.com
Thu Jan 22 12:14:00 GMT 2009

It turns out that by aligning local arrays/structs/unions to a word
boundary we can get improvements to both performance and code size.  The
same is true of static data, provided we can see the definition (if we
can't see the definition we can't generate better code, but some memory
operations (such as memcpy, strcmp etc) can exploit the extra alignment
to run more efficently.

This does not change the ABI, the compiler is still conservative if the
declaration is extern.

2009-01-22  Richard Earnshaw  <rearnsha@arm.com>

	* arm.h (DATA_ALIGNMENT): Align structures, unions and arrays to
	a word boundary.
	(LOCAL_ALIGNMENT): Similarly.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: align.patch
Type: text/x-patch
Size: 1139 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090122/7ad8f591/attachment.bin>

More information about the Gcc-patches mailing list