aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorChristian Bruel <christian.bruel@st.com>2015-10-16 15:52:51 +0200
committerChristian Bruel <chrbr@gcc.gnu.org>2015-10-16 15:52:51 +0200
commit63b0cb0436382abe256360ca3e83c02041b8ffe2 (patch)
treedd02fa210573226e6a7f1a92dd5a6db115002160 /gcc/passes.c
parent1df7c326c72121e3f18743dadb6880a102b018ed (diff)
downloadgcc-63b0cb0436382abe256360ca3e83c02041b8ffe2.zip
gcc-63b0cb0436382abe256360ca3e83c02041b8ffe2.tar.gz
gcc-63b0cb0436382abe256360ca3e83c02041b8ffe2.tar.bz2
re PR target/67745 ([ARM] wrong alignments when __attribute__ ((optimize,target,align) is used)
2015-10-16 Christian Bruel <christian.bruel@st.com> PR target/67745 * config/arm/arm.h (FUNCTION_BOUNDARY): Use FUNCTION_BOUNDARY_P. (FUNCTION_BOUNDARY_P): New macro: * config/arm/arm.c (TARGET_RELAYOUT_FUNCTION, arm_relayout_function): New hook. * doc/tm.texi.in (TARGET_RELAYOUT_FUNCTION): Document. * doc/tm.texi (TARGET_RELAYOUT_FUNCTION): New hook. * gcc/target.def (TARGET_RELAYOUT_FUNCTION): Likewise. * gcc/function.c (allocate_struct_function): Call relayout_function hook. * gcc/passes.c (rest_of_decl_compilation): Likewise. From-SVN: r228912
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 5b41102..6ef6d2e 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -253,6 +253,11 @@ rest_of_decl_compilation (tree decl,
}
#endif
+ /* Now that we have activated any function-specific attributes
+ that might affect function decl, particularly align, relayout it. */
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ targetm.target_option.relayout_function (decl);
+
timevar_pop (TV_VARCONST);
}
else if (TREE_CODE (decl) == TYPE_DECL