Debian Codegraph @

gcc/config/aarch64/aarch64.opt

raw
1 ; Machine description for AArch64 architecture.
2 ; Copyright (C) 2009-2025 Free Software Foundation, Inc.
3 ; Contributed by ARM Ltd.
4 ;
5 ; This file is part of GCC.
6 ;
7 ; GCC is free software; you can redistribute it and/or modify it
8 ; under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation; either version 3, or (at your option)
10 ; any later version.
11 ;
12 ; GCC is distributed in the hope that it will be useful, but
13 ; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 ; General Public License for more details.
16 ;
17 ; You should have received a copy of the GNU General Public License
18 ; along with GCC; see the file COPYING3. If not see
19 ; <http://www.gnu.org/licenses/>.
20
21 HeaderInclude
22 config/aarch64/aarch64-opts.h
23
24 HeaderInclude
25 config/arm/aarch-common.h
26
27 TargetVariable
28 enum aarch64_cpu selected_tune = aarch64_no_cpu
29
30 TargetVariable
31 enum aarch64_arch selected_arch = aarch64_no_arch
32
33 TargetVariable
34 uint64_t aarch64_asm_isa_flags_0 = 0
35
36 TargetVariable
37 uint64_t aarch64_asm_isa_flags_1 = 0
38
39 TargetVariable
40 uint64_t aarch64_isa_flags_0 = 0
41
42 TargetVariable
43 uint64_t aarch64_isa_flags_1 = 0
44
45 TargetVariable
46 unsigned aarch_enable_bti = 2
47
48 TargetVariable
49 unsigned aarch64_enable_gcs = 2
50
51 TargetVariable
52 enum aarch64_key_type aarch64_ra_sign_key = AARCH64_KEY_A
53
54 ; The TLS dialect names to use with -mtls-dialect.
55
56 Enum
57 Name(tls_type) Type(enum aarch64_tls_type)
58 The possible TLS dialects:
59
60 EnumValue
61 Enum(tls_type) String(trad) Value(TLS_TRADITIONAL)
62
63 EnumValue
64 Enum(tls_type) String(desc) Value(TLS_DESCRIPTORS)
65
66 ; The code model option names for -mcmodel.
67
68 Enum
69 Name(cmodel) Type(enum aarch64_code_model)
70 The code model option names for -mcmodel:
71
72 EnumValue
73 Enum(cmodel) String(tiny) Value(AARCH64_CMODEL_TINY)
74
75 EnumValue
76 Enum(cmodel) String(small) Value(AARCH64_CMODEL_SMALL)
77
78 EnumValue
79 Enum(cmodel) String(large) Value(AARCH64_CMODEL_LARGE)
80
81 mbig-endian
82 Target RejectNegative Mask(BIG_END)
83 Assume target CPU is configured as big endian.
84
85 mgeneral-regs-only
86 Target RejectNegative Mask(GENERAL_REGS_ONLY) Save
87 Generate code which uses only the general registers.
88
89 mharden-sls=
90 Target RejectNegative Joined Var(aarch64_harden_sls_string)
91 Generate code to mitigate against straight line speculation.
92
93 mfix-cortex-a53-835769
94 Target Var(aarch64_fix_a53_err835769) Init(2) Save
95 Workaround for ARM Cortex-A53 Erratum number 835769.
96
97 mfix-cortex-a53-843419
98 Target Var(aarch64_fix_a53_err843419) Init(2) Save
99 Workaround for ARM Cortex-A53 Erratum number 843419.
100
101 mlittle-endian
102 Target RejectNegative InverseMask(BIG_END)
103 Assume target CPU is configured as little endian.
104
105 mcmodel=
106 Target RejectNegative Joined Enum(cmodel) Var(aarch64_cmodel_var) Init(AARCH64_CMODEL_SMALL) Save
107 Specify the code model.
108
109 Enum
110 Name(tp_reg) Type(enum aarch64_tp_reg)
111 The register used to access the thread pointer:
112
113 EnumValue
114 Enum(tp_reg) String(el0) Value(AARCH64_TPIDR_EL0)
115
116 EnumValue
117 Enum(tp_reg) String(tpidr_el0) Value(AARCH64_TPIDR_EL0)
118
119 EnumValue
120 Enum(tp_reg) String(el1) Value(AARCH64_TPIDR_EL1)
121
122 EnumValue
123 Enum(tp_reg) String(tpidr_el1) Value(AARCH64_TPIDR_EL1)
124
125 EnumValue
126 Enum(tp_reg) String(el2) Value(AARCH64_TPIDR_EL2)
127
128 EnumValue
129 Enum(tp_reg) String(tpidr_el2) Value(AARCH64_TPIDR_EL2)
130
131 EnumValue
132 Enum(tp_reg) String(el3) Value(AARCH64_TPIDR_EL3)
133
134 EnumValue
135 Enum(tp_reg) String(tpidr_el3) Value(AARCH64_TPIDR_EL3)
136
137 EnumValue
138 Enum(tp_reg) String(tpidrro_el0) Value(AARCH64_TPIDRRO_EL0)
139
140 mtp=
141 Target RejectNegative Joined Enum(tp_reg) Var(aarch64_tpidr_reg) Init(AARCH64_TPIDR_EL0) Save
142 Specify the thread pointer register.
143
144 mstrict-align
145 Target Mask(STRICT_ALIGN) Save
146 Don't assume that unaligned accesses are handled by the system.
147
148 momit-leaf-frame-pointer
149 Target Var(flag_omit_leaf_frame_pointer) Init(2) Save
150 Omit the frame pointer in leaf functions.
151
152 mtls-dialect=
153 Target RejectNegative Joined Enum(tls_type) Var(aarch64_tls_dialect) Init(TLS_DESCRIPTORS) Save
154 Specify TLS dialect.
155
156 mtls-size=
157 Target RejectNegative Joined Var(aarch64_tls_size) Enum(aarch64_tls_size)
158 Specifies bit size of immediate TLS offsets. Valid values are 12, 24, 32, 48.
159
160 Enum
161 Name(aarch64_tls_size) Type(int)
162
163 EnumValue
164 Enum(aarch64_tls_size) String(12) Value(12)
165
166 EnumValue
167 Enum(aarch64_tls_size) String(24) Value(24)
168
169 EnumValue
170 Enum(aarch64_tls_size) String(32) Value(32)
171
172 EnumValue
173 Enum(aarch64_tls_size) String(48) Value(48)
174
175 march=
176 Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
177 Use features of architecture ARCH.
178
179 mcpu=
180 Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
181 Use features of and optimize for CPU.
182
183 mtune=
184 Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
185 Optimize for CPU.
186
187 mabi=
188 Target RejectNegative Joined Enum(aarch64_abi) Var(aarch64_abi) Init(AARCH64_ABI_DEFAULT)
189 Generate code that conforms to the specified ABI.
190
191 moverride=
192 Target RejectNegative ToLower Joined Var(aarch64_override_tune_string) Save
193 -moverride=<string> Power users only! Override CPU optimization parameters.
194
195 Enum
196 Name(aarch64_abi) Type(int)
197 Known AArch64 ABIs (for use with the -mabi= option):
198
199 EnumValue
200 Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32)
201
202 EnumValue
203 Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64)
204
205 mpc-relative-literal-loads
206 Target Save Var(pcrelative_literal_loads) Init(2) Save
207 PC relative literal loads.
208
209 mbranch-protection=
210 Target RejectNegative Joined Var(aarch64_branch_protection_string) Save
211 Use branch-protection features.
212
213 msign-return-address=
214 Target WarnRemoved RejectNegative Joined Enum(aarch_ra_sign_scope_t) Var(aarch_ra_sign_scope) Init(AARCH_FUNCTION_NONE) Save
215 Select return address signing scope.
216
217 Enum
218 Name(aarch_ra_sign_scope_t) Type(enum aarch_function_type)
219 Supported AArch64 return address signing scope (for use with -msign-return-address= option):
220
221 EnumValue
222 Enum(aarch_ra_sign_scope_t) String(none) Value(AARCH_FUNCTION_NONE)
223
224 EnumValue
225 Enum(aarch_ra_sign_scope_t) String(non-leaf) Value(AARCH_FUNCTION_NON_LEAF)
226
227 EnumValue
228 Enum(aarch_ra_sign_scope_t) String(all) Value(AARCH_FUNCTION_ALL)
229
230 mlow-precision-recip-sqrt
231 Target Var(flag_mrecip_low_precision_sqrt) Optimization
232 Enable the reciprocal square root approximation. Enabling this reduces
233 precision of reciprocal square root results to about 16 bits for
234 single precision and to 32 bits for double precision.
235
236 mlow-precision-sqrt
237 Target Var(flag_mlow_precision_sqrt) Optimization
238 Enable the square root approximation. Enabling this reduces
239 precision of square root results to about 16 bits for
240 single precision and to 32 bits for double precision.
241 If enabled, it implies -mlow-precision-recip-sqrt.
242
243 mlow-precision-div
244 Target Var(flag_mlow_precision_div) Optimization
245 Enable the division approximation. Enabling this reduces
246 precision of division results to about 16 bits for
247 single precision and to 32 bits for double precision.
248
249 Enum
250 Name(early_ra_scope) Type(enum aarch64_early_ra_scope)
251
252 EnumValue
253 Enum(early_ra_scope) String(all) Value(AARCH64_EARLY_RA_ALL)
254
255 EnumValue
256 Enum(early_ra_scope) String(strided) Value(AARCH64_EARLY_RA_STRIDED)
257
258 EnumValue
259 Enum(early_ra_scope) String(none) Value(AARCH64_EARLY_RA_NONE)
260
261 mearly-ra=
262 Target RejectNegative Joined Enum(early_ra_scope) Var(aarch64_early_ra) Init(AARCH64_EARLY_RA_NONE) Optimization
263 Specify when to enable an early register allocation pass. The possibilities
264 are: all functions, functions that have access to strided multi-register
265 instructions, and no functions.
266
267 Enum
268 Name(sve_vector_bits) Type(enum aarch64_sve_vector_bits_enum)
269 The possible SVE vector lengths:
270
271 EnumValue
272 Enum(sve_vector_bits) String(scalable) Value(SVE_SCALABLE)
273
274 EnumValue
275 Enum(sve_vector_bits) String(128) Value(SVE_128)
276
277 EnumValue
278 Enum(sve_vector_bits) String(256) Value(SVE_256)
279
280 EnumValue
281 Enum(sve_vector_bits) String(512) Value(SVE_512)
282
283 EnumValue
284 Enum(sve_vector_bits) String(1024) Value(SVE_1024)
285
286 EnumValue
287 Enum(sve_vector_bits) String(2048) Value(SVE_2048)
288
289 msve-vector-bits=
290 Target RejectNegative Joined Enum(sve_vector_bits) Var(aarch64_sve_vector_bits) Init(SVE_SCALABLE)
291 -msve-vector-bits=<number> Set the number of bits in an SVE vector register.
292
293 mverbose-cost-dump
294 Target Undocumented Var(flag_aarch64_verbose_cost)
295 Enables verbose cost model dumping in the debug dump files.
296
297 mtrack-speculation
298 Target Var(aarch64_track_speculation)
299 Generate code to track when the CPU might be speculating incorrectly.
300
301 mearly-ldp-fusion
302 Target Var(flag_aarch64_early_ldp_fusion) Optimization Init(1)
303 Enable the copy of the AArch64 load/store pair fusion pass that runs before
304 register allocation.
305
306 mlate-ldp-fusion
307 Target Var(flag_aarch64_late_ldp_fusion) Optimization Init(1)
308 Enable the copy of the AArch64 load/store pair fusion pass that runs after
309 register allocation.
310
311 mstack-protector-guard=
312 Target RejectNegative Joined Enum(stack_protector_guard) Var(aarch64_stack_protector_guard) Init(SSP_GLOBAL)
313 Use given stack-protector guard.
314
315 Enum
316 Name(stack_protector_guard) Type(enum stack_protector_guard)
317 Valid arguments to -mstack-protector-guard=:
318
319 EnumValue
320 Enum(stack_protector_guard) String(sysreg) Value(SSP_SYSREG)
321
322 EnumValue
323 Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
324
325 mstack-protector-guard-reg=
326 Target Joined RejectNegative String Var(aarch64_stack_protector_guard_reg_str)
327 Use the system register specified on the command line as the stack protector
328 guard register. This option is for use with fstack-protector-strong and
329 not for use in user-land code.
330
331 mstack-protector-guard-offset=
332 Target Joined RejectNegative String Var(aarch64_stack_protector_guard_offset_str)
333 Use an immediate to offset from the stack protector guard register, sp_el0.
334 This option is for use with fstack-protector-strong and not for use in
335 user-land code.
336
337 TargetVariable
338 long aarch64_stack_protector_guard_offset = 0
339
340 moutline-atomics
341 Target Var(aarch64_flag_outline_atomics) Init(2) Save
342 Generate local calls to out-of-line atomic operations.
343
344 msimd-memops
345 Target Var(aarch64_flag_simd_memops) Init(AARCH64_SIMD_MEMOPS_DEFAULT) Save
346 Allow use of SIMD registers in memory set/copy expansions.
347
348 -param=aarch64-vect-compare-costs=
349 Target Joined UInteger Var(aarch64_vect_compare_costs) Init(1) IntegerRange(0, 1) Param
350 When vectorizing, consider using multiple different approaches and use
351 the cost model to choose the cheapest one.
352
353 -param=aarch64-float-recp-precision=
354 Target Joined UInteger Var(aarch64_float_recp_precision) Init(1) IntegerRange(1, 5) Param
355 The number of Newton iterations for calculating the reciprocal for float type. The precision of division is proportional to this param when division approximation is enabled. The default value is 1.
356
357 -param=aarch64-double-recp-precision=
358 Target Joined UInteger Var(aarch64_double_recp_precision) Init(2) IntegerRange(1, 5) Param
359 The number of Newton iterations for calculating the reciprocal for double type. The precision of division is proportional to this param when division approximation is enabled. The default value is 2.
360
361 -param=aarch64-autovec-preference=
362 Target Joined Var(aarch64_autovec_preference) Enum(aarch64_autovec_preference) Init(AARCH64_AUTOVEC_DEFAULT) Param
363 --param=aarch64-autovec-preference=[default|asimd-only|sve-only|prefer-asimd|prefer-sve]
364 Force an ISA selection strategy for auto-vectorization.
365
366 Enum
367 Name(aarch64_autovec_preference) Type(enum aarch64_autovec_preference_enum) UnknownError(unknown autovec preference %qs)
368
369 EnumValue
370 Enum(aarch64_autovec_preference) String(default) Value(AARCH64_AUTOVEC_DEFAULT)
371
372 EnumValue
373 Enum(aarch64_autovec_preference) String(asimd-only) Value(AARCH64_AUTOVEC_ASIMD_ONLY)
374
375 EnumValue
376 Enum(aarch64_autovec_preference) String(sve-only) Value(AARCH64_AUTOVEC_SVE_ONLY)
377
378 EnumValue
379 Enum(aarch64_autovec_preference) String(prefer-asimd) Value(AARCH64_AUTOVEC_PREFER_ASIMD)
380
381 EnumValue
382 Enum(aarch64_autovec_preference) String(prefer-sve) Value(AARCH64_AUTOVEC_PREFER_SVE)
383
384 -param=aarch64-loop-vect-issue-rate-niters=
385 Target Joined UInteger Var(aarch64_loop_vect_issue_rate_niters) Init(6) IntegerRange(0, 65536) Param
386
387 -param=aarch64-mops-memcpy-size-threshold=
388 Target Joined UInteger Var(aarch64_mops_memcpy_size_threshold) Init(256) Param
389 Constant memcpy size in bytes above which to start using MOPS sequence.
390
391 -param=aarch64-mops-memmove-size-threshold=
392 Target Joined UInteger Var(aarch64_mops_memmove_size_threshold) Init(256) Param
393 Constant memmove size in bytes above which to start using MOPS sequence.
394
395 -param=aarch64-mops-memset-size-threshold=
396 Target Joined UInteger Var(aarch64_mops_memset_size_threshold) Init(256) Param
397 Constant memset size in bytes from which to start using MOPS sequence.
398
399 -param=aarch64-vect-unroll-limit=
400 Target Joined UInteger Var(aarch64_vect_unroll_limit) Init(4) Param
401 Limit how much the autovectorizer may unroll a loop.
402
403 -param=aarch64-ldp-policy=
404 Target Joined Var(aarch64_ldp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param
405 --param=aarch64-ldp-policy=[default|always|never|aligned] Fine-grained policy for load pairs.
406
407 -param=aarch64-stp-policy=
408 Target Joined Var(aarch64_stp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param
409 --param=aarch64-stp-policy=[default|always|never|aligned] Fine-grained policy for store pairs.
410
411 Enum
412 Name(aarch64_ldp_stp_policy) Type(enum aarch64_ldp_stp_policy) UnknownError(unknown LDP/STP policy %qs)
413
414 EnumValue
415 Enum(aarch64_ldp_stp_policy) String(default) Value(AARCH64_LDP_STP_POLICY_DEFAULT)
416
417 EnumValue
418 Enum(aarch64_ldp_stp_policy) String(always) Value(AARCH64_LDP_STP_POLICY_ALWAYS)
419
420 EnumValue
421 Enum(aarch64_ldp_stp_policy) String(never) Value(AARCH64_LDP_STP_POLICY_NEVER)
422
423 EnumValue
424 Enum(aarch64_ldp_stp_policy) String(aligned) Value(AARCH64_LDP_STP_POLICY_ALIGNED)
425
426 -param=aarch64-ldp-alias-check-limit=
427 Target Joined UInteger Var(aarch64_ldp_alias_check_limit) Init(8) IntegerRange(0, 65536) Param
428 Limit on number of alias checks performed when attempting to form an ldp/stp.
429
430 -param=aarch64-ldp-writeback=
431 Target Joined UInteger Var(aarch64_ldp_writeback) Init(2) IntegerRange(0,2) Param
432 Param to control which writeback opportunities we try to handle in the
433 load/store pair fusion pass. A value of zero disables writeback
434 handling. One means we try to form pairs involving one or more existing
435 individual writeback accesses where possible. A value of two means we
436 also try to opportunistically form writeback opportunities by folding in
437 trailing destructive updates of the base register used by a pair.
438
439 Wexperimental-fmv-target
440 Target Var(warn_experimental_fmv) Warning Init(1)
441 Warn about usage of experimental Function Multi Versioning.