aboutsummaryrefslogtreecommitdiff
path: root/gcc/adjust-alignment.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-21Include memmodel.h in adjust-alignment.cRainer Orth1-0/+1
Commit dfa4fcdba374ed44d4aa1a22b2738f3f5c5b37af broke SPARC bootstrap: In file included from ./tm_p.h:4, from /vol/gcc/src/hg/master/local/gcc/adjust-alignment.c:28: /vol/gcc/src/hg/master/local/gcc/config/sparc/sparc-protos.h:45:47: error: use of enum 'memmodel' without previous declaration extern void sparc_emit_membar_for_model (enum memmodel, int, int); ^~~~~~~~ Fixed by including memmodel.h. Bootstrapped on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2020-05-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/ * adjust-alignment.c: Include memmodel.h.
2020-05-20Fix alignment for local variable [PR90811]Kito Cheng1-0/+84
- The alignment for local variable was adjust during estimate_stack_frame_size, however it seems wrong spot to adjust that, expand phase will adjust that but it little too late to some gimple optimization, which rely on certain target hooks need to check alignment, forwprop is an example for that, result of simplify_builtin_call rely on the alignment on some target like ARM or RISC-V. - Exclude static local var and hard register var in the process of alignment adjustment. - This patch fix gfortran.dg/pr45636.f90 for arm and riscv. - Regression test on riscv32/riscv64 and x86_64-linux-gnu, no new fail introduced. gcc/ChangeLog PR target/90811 * Makefile.in (OBJS): Add adjust-alignment.o. * adjust-alignment.c (pass_data_adjust_alignment): New. (pass_adjust_alignment): New. (pass_adjust_alignment::execute): New. (make_pass_adjust_alignment): New. * tree-pass.h (make_pass_adjust_alignment): New. * passes.def: Add pass_adjust_alignment.