diff options
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/rtti.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5f6ee37..2cfc428 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2014-05-23 Jan Hubicka <hubicka@ucw.cz> + * rtti.c: Include tm_p.h + (emit_tinfo_decl): Force RTTI data to be aligned to required + ABI alignment only. + +2014-05-23 Jan Hubicka <hubicka@ucw.cz> + * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN ignoring other target adjustments. diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index e9e2c44..b665a8d 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tm.h" #include "tree.h" +#include "tm_p.h" #include "stringpool.h" #include "stor-layout.h" #include "cp-tree.h" @@ -1596,6 +1597,12 @@ emit_tinfo_decl (tree decl) DECL_INITIAL (decl) = init; mark_used (decl); cp_finish_decl (decl, init, false, NULL_TREE, 0); + /* Avoid targets optionally bumping up the alignment to improve + vector instruction accesses, tinfo are never accessed this way. */ +#ifdef DATA_ABI_ALIGNMENT + DECL_ALIGN (decl) = DATA_ABI_ALIGNMENT (decl, TYPE_ALIGN (TREE_TYPE (decl))); + DECL_USER_ALIGN (decl) = true; +#endif return true; } else |
