| 1 |
/* Tuning model description for the NVIDIA Olympus core. |
| 2 |
Copyright The GNU Toolchain Authors. |
| 3 |
|
| 4 |
This file is part of GCC. |
| 5 |
|
| 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) |
| 9 |
any later version. |
| 10 |
|
| 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. |
| 15 |
|
| 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/>. */ |
| 19 |
|
| 20 |
#ifndef GCC_AARCH64_H_OLYMPUS |
| 21 |
#define GCC_AARCH64_H_OLYMPUS |
| 22 |
|
| 23 |
#include "generic.h" |
| 24 |
|
| 25 |
static struct cpu_regmove_cost olympus_regmove_cost = |
| 26 |
{ |
| 27 |
1, /* GP2GP */ |
| 28 |
/* Spilling to int<->fp instead of memory is recommended so set |
| 29 |
realistic costs compared to memmov_cost. */ |
| 30 |
3, /* GP2FP */ |
| 31 |
3, /* FP2GP */ |
| 32 |
2 /* FP2FP */ |
| 33 |
}; |
| 34 |
|
| 35 |
static advsimd_vec_cost olympus_advsimd_vector_cost = |
| 36 |
{ |
| 37 |
2, /* int_stmt_cost */ |
| 38 |
2, /* fp_stmt_cost */ |
| 39 |
2, /* ld2_st2_permute_cost */ |
| 40 |
2, /* ld3_st3_permute_cost */ |
| 41 |
3, /* ld4_st4_permute_cost */ |
| 42 |
2, /* permute_cost */ |
| 43 |
5, /* reduc_i8_cost */ |
| 44 |
3, /* reduc_i16_cost */ |
| 45 |
3, /* reduc_i32_cost */ |
| 46 |
2, /* reduc_i64_cost */ |
| 47 |
4, /* reduc_f16_cost */ |
| 48 |
4, /* reduc_f32_cost */ |
| 49 |
4, /* reduc_f64_cost */ |
| 50 |
2, /* store_elt_extra_cost */ |
| 51 |
8, /* vec_to_scalar_cost */ |
| 52 |
4, /* scalar_to_vec_cost */ |
| 53 |
6, /* align_load_cost */ |
| 54 |
6, /* unalign_load_cost */ |
| 55 |
1, /* unalign_store_cost */ |
| 56 |
1 /* store_cost */ |
| 57 |
}; |
| 58 |
|
| 59 |
static sve_vec_cost olympus_sve_vector_cost = |
| 60 |
{ |
| 61 |
{ |
| 62 |
2, /* int_stmt_cost */ |
| 63 |
2, /* fp_stmt_cost */ |
| 64 |
2, /* ld2_st2_permute_cost */ |
| 65 |
3, /* ld3_st3_permute_cost */ |
| 66 |
3, /* ld4_st4_permute_cost */ |
| 67 |
2, /* permute_cost */ |
| 68 |
9, /* reduc_i8_cost */ |
| 69 |
8, /* reduc_i16_cost */ |
| 70 |
6, /* reduc_i32_cost */ |
| 71 |
2, /* reduc_i64_cost */ |
| 72 |
8, /* reduc_f16_cost */ |
| 73 |
6, /* reduc_f32_cost */ |
| 74 |
4, /* reduc_f64_cost */ |
| 75 |
2, /* store_elt_extra_cost */ |
| 76 |
8, /* vec_to_scalar_cost */ |
| 77 |
4, /* scalar_to_vec_cost */ |
| 78 |
6, /* align_load_cost */ |
| 79 |
6, /* unalign_load_cost */ |
| 80 |
1, /* unalign_store_cost */ |
| 81 |
1 /* store_cost */ |
| 82 |
}, |
| 83 |
3, /* clast_cost */ |
| 84 |
10, /* fadda_f16_cost */ |
| 85 |
6, /* fadda_f32_cost */ |
| 86 |
4, /* fadda_f64_cost */ |
| 87 |
14, /* gather_load_x32_cost */ |
| 88 |
12, /* gather_load_x64_cost */ |
| 89 |
42, /* gather_load_x32_init_cost */ |
| 90 |
24, /* gather_load_x64_init_cost */ |
| 91 |
1 /* scatter_store_elt_cost */ |
| 92 |
}; |
| 93 |
|
| 94 |
static aarch64_scalar_vec_issue_info olympus_scalar_issue_info = |
| 95 |
{ |
| 96 |
6, /* loads_stores_per_cycle */ |
| 97 |
2, /* stores_per_cycle */ |
| 98 |
8, /* general_ops_per_cycle */ |
| 99 |
0, /* fp_simd_load_general_ops */ |
| 100 |
1 /* fp_simd_store_general_ops */ |
| 101 |
}; |
| 102 |
|
| 103 |
static aarch64_advsimd_vec_issue_info olympus_advsimd_issue_info = |
| 104 |
{ |
| 105 |
{ |
| 106 |
6, /* loads_stores_per_cycle */ |
| 107 |
2, /* stores_per_cycle */ |
| 108 |
6, /* general_ops_per_cycle */ |
| 109 |
0, /* fp_simd_load_general_ops */ |
| 110 |
1 /* fp_simd_store_general_ops */ |
| 111 |
}, |
| 112 |
2, /* ld2_st2_general_ops */ |
| 113 |
2, /* ld3_st3_general_ops */ |
| 114 |
3 /* ld4_st4_general_ops */ |
| 115 |
}; |
| 116 |
|
| 117 |
static aarch64_sve_vec_issue_info olympus_sve_issue_info = |
| 118 |
{ |
| 119 |
{ |
| 120 |
{ |
| 121 |
6, /* loads_stores_per_cycle */ |
| 122 |
2, /* stores_per_cycle */ |
| 123 |
6, /* general_ops_per_cycle */ |
| 124 |
0, /* fp_simd_load_general_ops */ |
| 125 |
1 /* fp_simd_store_general_ops */ |
| 126 |
}, |
| 127 |
2, /* ld2_st2_general_ops */ |
| 128 |
2, /* ld3_st3_general_ops */ |
| 129 |
3 /* ld4_st4_general_ops */ |
| 130 |
}, |
| 131 |
2, /* pred_ops_per_cycle */ |
| 132 |
1, /* while_pred_ops */ |
| 133 |
0, /* int_cmp_pred_ops */ |
| 134 |
0, /* fp_cmp_pred_ops */ |
| 135 |
1, /* gather_scatter_pair_general_ops */ |
| 136 |
1 /* gather_scatter_pair_pred_ops */ |
| 137 |
}; |
| 138 |
|
| 139 |
static aarch64_vec_issue_info olympus_vec_issue_info = |
| 140 |
{ |
| 141 |
&olympus_scalar_issue_info, |
| 142 |
&olympus_advsimd_issue_info, |
| 143 |
&olympus_sve_issue_info |
| 144 |
}; |
| 145 |
|
| 146 |
/* Olympus costs for vector insn classes. */ |
| 147 |
static struct cpu_vector_cost olympus_vector_cost = |
| 148 |
{ |
| 149 |
1, /* scalar_int_stmt_cost */ |
| 150 |
2, /* scalar_fp_stmt_cost */ |
| 151 |
4, /* scalar_load_cost */ |
| 152 |
1, /* scalar_store_cost */ |
| 153 |
1, /* cond_taken_branch_cost */ |
| 154 |
1, /* cond_not_taken_branch_cost */ |
| 155 |
&olympus_advsimd_vector_cost, /* advsimd */ |
| 156 |
&olympus_sve_vector_cost, /* sve */ |
| 157 |
&olympus_vec_issue_info /* issue_info */ |
| 158 |
}; |
| 159 |
|
| 160 |
/* Olympus prefetch settings (which disable prefetch). */ |
| 161 |
static cpu_prefetch_tune olympus_prefetch_tune = |
| 162 |
{ |
| 163 |
0, /* num_slots */ |
| 164 |
-1, /* l1_cache_size */ |
| 165 |
64, /* l1_cache_line_size */ |
| 166 |
-1, /* l2_cache_size */ |
| 167 |
true, /* prefetch_dynamic_strides */ |
| 168 |
-1, /* minimum_stride */ |
| 169 |
-1 /* default_opt_level */ |
| 170 |
}; |
| 171 |
|
| 172 |
static struct tune_params olympus_tunings = |
| 173 |
{ |
| 174 |
&cortexa76_extra_costs, |
| 175 |
&generic_armv9_a_addrcost_table, |
| 176 |
&olympus_regmove_cost, |
| 177 |
&olympus_vector_cost, |
| 178 |
&generic_branch_cost, |
| 179 |
&generic_approx_modes, |
| 180 |
SVE_128, /* sve_width */ |
| 181 |
{ 4, /* load_int. */ |
| 182 |
1, /* store_int. */ |
| 183 |
6, /* load_fp. */ |
| 184 |
3, /* store_fp. */ |
| 185 |
5, /* load_pred. */ |
| 186 |
1 /* store_pred. */ |
| 187 |
}, /* memmov_cost. */ |
| 188 |
10, /* issue_rate */ |
| 189 |
AARCH64_FUSE_NEOVERSE_BASE, /* fusible_ops */ |
| 190 |
"32:16", /* function_align. */ |
| 191 |
"4", /* jump_align. */ |
| 192 |
"32:16", /* loop_align. */ |
| 193 |
8, /* int_reassoc_width. */ |
| 194 |
6, /* fp_reassoc_width. */ |
| 195 |
4, /* fma_reassoc_width. */ |
| 196 |
6, /* vec_reassoc_width. */ |
| 197 |
2, /* min_div_recip_mul_sf. */ |
| 198 |
2, /* min_div_recip_mul_df. */ |
| 199 |
0, /* max_case_values. */ |
| 200 |
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ |
| 201 |
(AARCH64_EXTRA_TUNE_BASE |
| 202 |
| AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS |
| 203 |
| AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT |
| 204 |
| AARCH64_EXTRA_TUNE_AVOID_PRED_RMW), /* tune_flags. */ |
| 205 |
&olympus_prefetch_tune, |
| 206 |
AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */ |
| 207 |
AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */ |
| 208 |
}; |
| 209 |
|
| 210 |
#endif /* GCC_AARCH64_H_OLYMPUS. */ |