1 /* Tuning model description for AArch64 architecture.
2 Copyright (C) 2009-2025 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_THUNDERX
21 #define GCC_AARCH64_H_THUNDERX
25 static const struct cpu_regmove_cost thunderx_regmove_cost
=
33 static const advsimd_vec_cost thunderx_advsimd_vector_cost
=
35 4, /* int_stmt_cost */
37 0, /* ld2_st2_permute_cost */
38 0, /* ld3_st3_permute_cost */
39 0, /* ld4_st4_permute_cost */
41 2, /* reduc_i8_cost */
42 2, /* reduc_i16_cost */
43 2, /* reduc_i32_cost */
44 2, /* reduc_i64_cost */
45 2, /* reduc_f16_cost */
46 2, /* reduc_f32_cost */
47 2, /* reduc_f64_cost */
48 2, /* store_elt_extra_cost */
49 2, /* vec_to_scalar_cost */
50 2, /* scalar_to_vec_cost */
51 3, /* align_load_cost */
52 5, /* unalign_load_cost */
53 5, /* unalign_store_cost */
57 /* ThunderX costs for vector insn classes. */
58 static const struct cpu_vector_cost thunderx_vector_cost
=
60 1, /* scalar_int_stmt_cost */
61 1, /* scalar_fp_stmt_cost */
62 3, /* scalar_load_cost */
63 1, /* scalar_store_cost */
64 3, /* cond_taken_branch_cost */
65 3, /* cond_not_taken_branch_cost */
66 &thunderx_advsimd_vector_cost
, /* advsimd */
68 nullptr /* issue_info */
71 static const cpu_prefetch_tune thunderx_prefetch_tune
=
74 32, /* l1_cache_size */
75 128, /* l1_cache_line_size */
76 -1, /* l2_cache_size */
77 true, /* prefetch_dynamic_strides */
78 -1, /* minimum_stride */
79 -1 /* default_opt_level */
82 static const struct tune_params thunderx_tunings
=
84 &thunderx_extra_costs
,
85 &generic_addrcost_table
,
86 &thunderx_regmove_cost
,
87 &thunderx_vector_cost
,
89 &generic_approx_modes
,
90 SVE_NOT_IMPLEMENTED
, /* sve_width */
99 AARCH64_FUSE_ALU_BRANCH
, /* fusible_ops */
100 "8", /* function_align. */
101 "8", /* jump_align. */
102 "8", /* loop_align. */
103 2, /* int_reassoc_width. */
104 4, /* fp_reassoc_width. */
105 1, /* fma_reassoc_width. */
106 1, /* vec_reassoc_width. */
107 2, /* min_div_recip_mul_sf. */
108 2, /* min_div_recip_mul_df. */
109 0, /* max_case_values. */
110 tune_params::AUTOPREFETCHER_OFF
, /* autoprefetcher_model. */
111 (AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND
), /* tune_flags. */
112 &thunderx_prefetch_tune
,
113 AARCH64_LDP_STP_POLICY_ALIGNED
, /* ldp_policy_model. */
114 AARCH64_LDP_STP_POLICY_ALIGNED
/* stp_policy_model. */
117 #endif /* GCC_AARCH64_H_THUNDERX. */