Debian Codegraph @

gcc/config/aarch64/tuning_models/xgene1.h

raw
1 /* Tuning model description for AArch64 architecture.
2 Copyright (C) 2009-2025 Free Software Foundation, Inc.
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_XGENE1
21 #define GCC_AARCH64_H_XGENE1
22
23 #include "generic.h"
24
25 static const struct cpu_addrcost_table xgene1_addrcost_table =
26 {
27 {
28 1, /* hi */
29 0, /* si */
30 0, /* di */
31 1, /* ti */
32 },
33 1, /* pre_modify */
34 1, /* post_modify */
35 1, /* post_modify_ld3_st3 */
36 1, /* post_modify_ld4_st4 */
37 0, /* register_offset */
38 1, /* register_sextend */
39 1, /* register_zextend */
40 0, /* imm_offset */
41 };
42
43 static const struct cpu_regmove_cost xgene1_regmove_cost =
44 {
45 1, /* GP2GP */
46 /* Avoid the use of slow int<->fp moves for spilling by setting
47 their cost higher than memmov_cost. */
48 8, /* GP2FP */
49 8, /* FP2GP */
50 2 /* FP2FP */
51 };
52
53 static const advsimd_vec_cost xgene1_advsimd_vector_cost =
54 {
55 2, /* int_stmt_cost */
56 2, /* fp_stmt_cost */
57 0, /* ld2_st2_permute_cost */
58 0, /* ld3_st3_permute_cost */
59 0, /* ld4_st4_permute_cost */
60 2, /* permute_cost */
61 4, /* reduc_i8_cost */
62 4, /* reduc_i16_cost */
63 4, /* reduc_i32_cost */
64 4, /* reduc_i64_cost */
65 4, /* reduc_f16_cost */
66 4, /* reduc_f32_cost */
67 4, /* reduc_f64_cost */
68 4, /* store_elt_extra_cost */
69 4, /* vec_to_scalar_cost */
70 4, /* scalar_to_vec_cost */
71 10, /* align_load_cost */
72 10, /* unalign_load_cost */
73 2, /* unalign_store_cost */
74 2 /* store_cost */
75 };
76
77 /* Generic costs for vector insn classes. */
78 static const struct cpu_vector_cost xgene1_vector_cost =
79 {
80 1, /* scalar_int_stmt_cost */
81 1, /* scalar_fp_stmt_cost */
82 5, /* scalar_load_cost */
83 1, /* scalar_store_cost */
84 2, /* cond_taken_branch_cost */
85 1, /* cond_not_taken_branch_cost */
86 &xgene1_advsimd_vector_cost, /* advsimd */
87 nullptr, /* sve */
88 nullptr /* issue_info */
89 };
90
91 /* Approximation modes for X-Gene 1. */
92 static const cpu_approx_modes xgene1_approx_modes =
93 {
94 AARCH64_APPROX_NONE, /* division */
95 AARCH64_APPROX_NONE, /* sqrt */
96 AARCH64_APPROX_ALL /* recip_sqrt */
97 };
98
99 static const cpu_prefetch_tune xgene1_prefetch_tune =
100 {
101 8, /* num_slots */
102 32, /* l1_cache_size */
103 64, /* l1_cache_line_size */
104 256, /* l2_cache_size */
105 true, /* prefetch_dynamic_strides */
106 -1, /* minimum_stride */
107 -1 /* default_opt_level */
108 };
109
110 static const struct tune_params xgene1_tunings =
111 {
112 &xgene1_extra_costs,
113 &xgene1_addrcost_table,
114 &xgene1_regmove_cost,
115 &xgene1_vector_cost,
116 &generic_branch_cost,
117 &xgene1_approx_modes,
118 SVE_NOT_IMPLEMENTED, /* sve_width */
119 { 6, /* load_int. */
120 6, /* store_int. */
121 6, /* load_fp. */
122 6, /* store_fp. */
123 6, /* load_pred. */
124 6 /* store_pred. */
125 }, /* memmov_cost. */
126 4, /* issue_rate */
127 AARCH64_FUSE_NOTHING, /* fusible_ops */
128 "16", /* function_align. */
129 "16", /* jump_align. */
130 "16", /* loop_align. */
131 2, /* int_reassoc_width. */
132 4, /* fp_reassoc_width. */
133 1, /* fma_reassoc_width. */
134 1, /* vec_reassoc_width. */
135 2, /* min_div_recip_mul_sf. */
136 2, /* min_div_recip_mul_df. */
137 17, /* max_case_values. */
138 tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
139 (AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
140 &xgene1_prefetch_tune,
141 AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
142 AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
143 };
144
145 #endif /* GCC_AARCH64_H_XGENE1. */