rtti.c: Include tm_p.h

* rtti.c: Include tm_p.h
	(emit_tinfo_decl): Force RTTI data to be aligned to required
	ABI alignment only.

From-SVN: r210887
This commit is contained in:
Jan Hubicka 2014-05-24 03:42:22 +02:00 committed by Jan Hubicka
parent 8ce8d98e74
commit c517fc92b5
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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