1 /* Tuning model description for AArch64 architecture.
2 Copyright (C) 2009-2024 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 GCC is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef GCC_AARCH64_H_THUNDERX2T99
21 #define GCC_AARCH64_H_THUNDERX2T99
25 static const struct cpu_addrcost_table thunderx2t99_addrcost_table
=
35 0, /* post_modify_ld3_st3 */
36 0, /* post_modify_ld4_st4 */
37 2, /* register_offset */
38 3, /* register_sextend */
39 3, /* register_zextend */
43 static const struct cpu_regmove_cost thunderx2t99_regmove_cost
=
46 /* Avoid the use of int<->fp moves for spilling. */
52 static const advsimd_vec_cost thunderx2t99_advsimd_vector_cost
=
54 4, /* int_stmt_cost */
56 0, /* ld2_st2_permute_cost */
57 0, /* ld3_st3_permute_cost */
58 0, /* ld4_st4_permute_cost */
59 10, /* permute_cost */
60 6, /* reduc_i8_cost */
61 6, /* reduc_i16_cost */
62 6, /* reduc_i32_cost */
63 6, /* reduc_i64_cost */
64 6, /* reduc_f16_cost */
65 6, /* reduc_f32_cost */
66 6, /* reduc_f64_cost */
67 6, /* store_elt_extra_cost */
68 6, /* vec_to_scalar_cost */
69 5, /* scalar_to_vec_cost */
70 4, /* align_load_cost */
71 4, /* unalign_load_cost */
72 1, /* unalign_store_cost */
76 /* Costs for vector insn classes for Vulcan. */
77 static const struct cpu_vector_cost thunderx2t99_vector_cost
=
79 1, /* scalar_int_stmt_cost */
80 6, /* scalar_fp_stmt_cost */
81 4, /* scalar_load_cost */
82 1, /* scalar_store_cost */
83 2, /* cond_taken_branch_cost */
84 1, /* cond_not_taken_branch_cost */
85 &thunderx2t99_advsimd_vector_cost
, /* advsimd */
87 nullptr /* issue_info */
90 static const cpu_prefetch_tune thunderx2t99_prefetch_tune
=
93 32, /* l1_cache_size */
94 64, /* l1_cache_line_size */
95 256, /* l2_cache_size */
96 true, /* prefetch_dynamic_strides */
97 -1, /* minimum_stride */
98 -1 /* default_opt_level */
101 static const struct tune_params thunderx2t99_tunings
=
103 &thunderx2t99_extra_costs
,
104 &thunderx2t99_addrcost_table
,
105 &thunderx2t99_regmove_cost
,
106 &thunderx2t99_vector_cost
,
107 &generic_branch_cost
,
108 &generic_approx_modes
,
109 SVE_NOT_IMPLEMENTED
, /* sve_width */
116 }, /* memmov_cost. */
118 (AARCH64_FUSE_ALU_BRANCH
| AARCH64_FUSE_AES_AESMC
119 | AARCH64_FUSE_ALU_CBZ
), /* fusible_ops */
120 "16", /* function_align. */
121 "8", /* jump_align. */
122 "16", /* loop_align. */
123 3, /* int_reassoc_width. */
124 2, /* fp_reassoc_width. */
125 1, /* fma_reassoc_width. */
126 2, /* vec_reassoc_width. */
127 2, /* min_div_recip_mul_sf. */
128 2, /* min_div_recip_mul_df. */
129 0, /* max_case_values. */
130 tune_params::AUTOPREFETCHER_WEAK
, /* autoprefetcher_model. */
131 (AARCH64_EXTRA_TUNE_NONE
), /* tune_flags. */
132 &thunderx2t99_prefetch_tune
,
133 AARCH64_LDP_STP_POLICY_ALWAYS
, /* ldp_policy_model. */
134 AARCH64_LDP_STP_POLICY_ALWAYS
/* stp_policy_model. */
137 #endif /* GCC_AARCH64_H_THUNDERX2T99. */