diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-03-11 22:12:33 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-03-11 22:12:33 +0100 |
commit | 9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e (patch) | |
tree | aac00dcd74a4bb14c38abd88b8fbe9ad9b4c2d6b /gcc/doc | |
parent | 8a9ceef2cc5783e9920cb48e8eb68c21c9244a29 (diff) | |
download | gcc-9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e.zip gcc-9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e.tar.gz gcc-9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e.tar.bz2 |
re PR target/39137 (-mpreferred-stack-boundary=2 causes lots of dynamic realign)
PR target/39137
* cfgexpand.c (get_decl_align_unit): Use LOCAL_DECL_ALIGNMENT
macro.
* defaults.h (LOCAL_DECL_ALIGNMENT): Define if not yet defined.
* config/i386/i386.h (LOCAL_DECL_ALIGNMENT): Define.
* config/i386/i386.c (ix86_local_alignment): For
-m32 -mpreferred-stack-boundary=2 use 32-bit alignment for
long long variables on the stack to avoid dynamic realignment.
Allow the first argument to be a decl rather than type.
* doc/tm.texi (LOCAL_DECL_ALIGNMENT): Document.
* gcc.target/i386/stackalign/longlong-1.c: New test.
* gcc.target/i386/stackalign/longlong-2.c: New test.
From-SVN: r144792
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index b4fcc2d..f4680b6 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1215,6 +1215,18 @@ This macro is to set alignment of stack slot to the maximum alignment of all possible modes which the slot may have. @end defmac +@defmac LOCAL_DECL_ALIGNMENT (@var{decl}) +If defined, a C expression to compute the alignment for a local +variable @var{decl}. + +If this macro is not defined, then +@code{LOCAL_ALIGNMENT (TREE_TYPE (@var{decl}), DECL_ALIGN (@var{decl}))} +is used. + +One use of this macro is to increase alignment of medium-size data to +make it all fit in fewer cache lines. +@end defmac + @defmac EMPTY_FIELD_BOUNDARY Alignment in bits to be given to a structure bit-field that follows an empty field such as @code{int : 0;}. |