diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2014-12-18 13:46:22 +0000 |
---|---|---|
committer | Jiong Wang <jiwang@gcc.gnu.org> | 2014-12-18 13:46:22 +0000 |
commit | 0b82a5a253f65400591264036266a6de4c2db6df (patch) | |
tree | a460ef8e877d3132ded140b5a67017ec1cdafcb5 /gcc | |
parent | 09cb9532c4c56979b1d9b105e5608ba22b66c5ac (diff) | |
download | gcc-0b82a5a253f65400591264036266a6de4c2db6df.zip gcc-0b82a5a253f65400591264036266a6de4c2db6df.tar.gz gcc-0b82a5a253f65400591264036266a6de4c2db6df.tar.bz2 |
[AArch64] Generalize code alignment
2014-12-18 Wilco Dijkstra <wilco.dijkstra@arm.com>
* config/aarch64/aarch64-protos.h (tune-params): Add code alignment
tuning parameters.
* gcc/config/aarch64/aarch64.c (generic_tunings): Add code alignment
tuning parameters.
(cortexa53_tunings): Likewise.
(cortexa57_tunings): Likewise.
(thunderx_tunings): Likewise.
(aarch64_override_options): Use new alignment tunings.
From-SVN: r218865
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64-protos.h | 4 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 22 |
3 files changed, 29 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1bb6944..6bb5ec2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2014-12-18 Wilco Dijkstra <wilco.dijkstra@arm.com> + + * config/aarch64/aarch64-protos.h (tune-params): Add code alignment + tuning parameters. + * gcc/config/aarch64/aarch64.c (generic_tunings): Add code alignment + tuning parameters. + (cortexa53_tunings): Likewise. + (cortexa57_tunings): Likewise. + (thunderx_tunings): Likewise. + (aarch64_override_options): Use new alignment tunings. + 2014-12-18 Martin Liska <mliska@suse.cz> PR tree-optimization/64330 diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 234efcb..f22573b 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -170,8 +170,10 @@ struct tune_params const struct cpu_vector_cost *const vec_costs; const int memmov_cost; const int issue_rate; - const int align; const unsigned int fuseable_ops; + const int function_align; + const int jump_align; + const int loop_align; const int int_reassoc_width; const int fp_reassoc_width; const int vec_reassoc_width; diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 226a808..cca53f2 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -323,8 +323,10 @@ static const struct tune_params generic_tunings = &generic_vector_cost, NAMED_PARAM (memmov_cost, 4), NAMED_PARAM (issue_rate, 2), - NAMED_PARAM (align, 4), NAMED_PARAM (fuseable_ops, AARCH64_FUSE_NOTHING), + 8, /* function_align. */ + 8, /* jump_align. */ + 4, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1 /* vec_reassoc_width. */ @@ -338,9 +340,11 @@ static const struct tune_params cortexa53_tunings = &generic_vector_cost, NAMED_PARAM (memmov_cost, 4), NAMED_PARAM (issue_rate, 2), - NAMED_PARAM (align, 8), NAMED_PARAM (fuseable_ops, (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD | AARCH64_FUSE_MOVK_MOVK | AARCH64_FUSE_ADRP_LDR)), + 8, /* function_align. */ + 8, /* jump_align. */ + 4, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1 /* vec_reassoc_width. */ @@ -354,8 +358,10 @@ static const struct tune_params cortexa57_tunings = &cortexa57_vector_cost, NAMED_PARAM (memmov_cost, 4), NAMED_PARAM (issue_rate, 3), - NAMED_PARAM (align, 8), NAMED_PARAM (fuseable_ops, (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD | AARCH64_FUSE_MOVK_MOVK)), + 16, /* function_align. */ + 8, /* jump_align. */ + 4, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1 /* vec_reassoc_width. */ @@ -369,8 +375,10 @@ static const struct tune_params thunderx_tunings = &generic_vector_cost, NAMED_PARAM (memmov_cost, 6), NAMED_PARAM (issue_rate, 2), - NAMED_PARAM (align, 8), NAMED_PARAM (fuseable_ops, AARCH64_FUSE_CMP_BRANCH), + 8, /* function_align. */ + 8, /* jump_align. */ + 8, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1 /* vec_reassoc_width. */ @@ -6771,11 +6779,11 @@ aarch64_override_options (void) if (!optimize_size) { if (align_loops <= 0) - align_loops = aarch64_tune_params->align; + align_loops = aarch64_tune_params->loop_align; if (align_jumps <= 0) - align_jumps = aarch64_tune_params->align; + align_jumps = aarch64_tune_params->jump_align; if (align_functions <= 0) - align_functions = aarch64_tune_params->align; + align_functions = aarch64_tune_params->function_align; } aarch64_override_options_after_change (); |