On Tue, Oct 31, 2017 at 05:07:54PM +0000, Wilco Dijkstra wrote: > The AArch64 backend currently doesn't set MALLOC_ABI_ALIGNMENT, so > add this to enable alignment optimizations on malloc pointers. > > OK for commit?
As far as I understand it, because we have 128-bit types, a malloc of anything greater than 16 bytes would require 16-byte alignment. So, assuming this macro isn't required to desribe possibly unaligned smaller allocations (for example 1 byte allocations), this is OK. Reviewed-By: James Greenhalgh <james.greenha...@arm.com> Thanks, James > > 2017-10-31 Wilco Dijkstra <wdijk...@arm.com> > > * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define. > -- > diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h > index > 8e7093f0476fa7fed3ba6d6cb008743106d1ff58..159dde7c7134d4d0e5378951d1d8a1d6dab48ba2 > 100644 > --- a/gcc/config/aarch64/aarch64.h > +++ b/gcc/config/aarch64/aarch64.h > @@ -111,6 +111,9 @@ > > #define STRUCTURE_SIZE_BOUNDARY 8 > > +/* Heap alignment. */ > +#define MALLOC_ABI_ALIGNMENT BIGGEST_ALIGNMENT > + > /* Defined by the ABI */ > #define WCHAR_TYPE "unsigned int" > #define WCHAR_TYPE_SIZE 32