libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / config / loongarch / loongarch.opt
blobfae575452fe02afabcca65b97b9db937a4cfd7d9
1 ; Generated by "genstr" from the template "loongarch.opt.in"
2 ; and definitions from "loongarch-strings" and "isa-evolution.in".
4 ; Please do not edit this file directly.
5 ; It will be automatically updated during a gcc build
6 ; if you change "loongarch.opt.in", "loongarch-strings", or
7 ; "isa-evolution.in".
9 ; Copyright (C) 2021-2024 Free Software Foundation, Inc.
11 ; This file is part of GCC.
13 ; GCC is free software; you can redistribute it and/or modify it under
14 ; the terms of the GNU General Public License as published by the Free
15 ; Software Foundation; either version 3, or (at your option) any later
16 ; version.
18 ; GCC is distributed in the hope that it will be useful, but WITHOUT
19 ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 ; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
21 ; License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with GCC; see the file COPYING3.  If not see
25 ; <http://www.gnu.org/licenses/>.
28 HeaderInclude
29 config/loongarch/loongarch-opts.h
31 HeaderInclude
32 config/loongarch/loongarch-str.h
34 TargetVariable
35 unsigned int recip_mask = 0
37 ; ISA related options
38 ;; Base ISA
39 Enum
40 Name(isa_base) Type(int)
41 Basic ISAs of LoongArch:
43 EnumValue
44 Enum(isa_base) String(la64) Value(ISA_BASE_LA64)
46 ;; ISA extensions / adjustments
47 Enum
48 Name(isa_ext_fpu) Type(int)
49 FPU types of LoongArch:
51 EnumValue
52 Enum(isa_ext_fpu) String(none) Value(ISA_EXT_NONE)
54 EnumValue
55 Enum(isa_ext_fpu) String(32) Value(ISA_EXT_FPU32)
57 EnumValue
58 Enum(isa_ext_fpu) String(64) Value(ISA_EXT_FPU64)
60 mfpu=
61 Target RejectNegative Joined ToLower Enum(isa_ext_fpu) Var(la_opt_fpu) Init(M_OPT_UNSET) Save
62 -mfpu=FPU       Generate code for the given FPU.
64 mfpu=0
65 Target RejectNegative Alias(mfpu=,none)
67 msoft-float
68 Target Driver Defer Var(la_deferred_options) RejectNegative Negative(msingle-float)
69 Prevent the use of all hardware floating-point instructions.
71 msingle-float
72 Target Driver Defer Var(la_deferred_options) RejectNegative Negative(mdouble-float)
73 Restrict the use of hardware floating-point instructions to 32-bit operations.
75 mdouble-float
76 Target Driver Defer Var(la_deferred_options) RejectNegative Negative(msoft-float)
77 Allow hardware floating-point instructions to cover both 32-bit and 64-bit operations.
79 Enum
80 Name(isa_ext_simd) Type(int)
81 SIMD extension levels of LoongArch:
83 EnumValue
84 Enum(isa_ext_simd) String(none) Value(ISA_EXT_NONE)
86 EnumValue
87 Enum(isa_ext_simd) String(lsx) Value(ISA_EXT_SIMD_LSX)
89 EnumValue
90 Enum(isa_ext_simd) String(lasx) Value(ISA_EXT_SIMD_LASX)
92 msimd=
93 Target RejectNegative Joined ToLower Enum(isa_ext_simd) Var(la_opt_simd) Init(M_OPT_UNSET) Save
94 -msimd=SIMD     Generate code for the given SIMD extension.
96 mlsx
97 Target Driver Defer Var(la_deferred_options)
98 Enable LoongArch SIMD Extension (LSX, 128-bit).
100 mlasx
101 Target Driver Defer Var(la_deferred_options)
102 Enable LoongArch Advanced SIMD Extension (LASX, 256-bit).
104 ;; Base target models (implies ISA & tune parameters)
105 Enum
106 Name(arch_type) Type(int)
107 LoongArch ARCH presets:
109 EnumValue
110 Enum(arch_type) String(native) Value(ARCH_NATIVE)
112 EnumValue
113 Enum(arch_type) String(abi-default) Value(ARCH_ABI_DEFAULT)
115 EnumValue
116 Enum(arch_type) String(loongarch64) Value(ARCH_LOONGARCH64)
118 EnumValue
119 Enum(arch_type) String(la464) Value(ARCH_LA464)
121 EnumValue
122 Enum(arch_type) String(la664) Value(ARCH_LA664)
124 EnumValue
125 Enum(arch_type) String(la64v1.0) Value(ARCH_LA64V1_0)
127 EnumValue
128 Enum(arch_type) String(la64v1.1) Value(ARCH_LA64V1_1)
130 march=
131 Target RejectNegative Joined Enum(arch_type) Var(la_opt_cpu_arch) Init(M_OPT_UNSET) Save
132 -march=PROCESSOR        Generate code for the given PROCESSOR ISA.
134 Enum
135 Name(tune_type) Type(int)
136 LoongArch TUNE presets:
138 EnumValue
139 Enum(tune_type) String(native) Value(TUNE_NATIVE)
141 EnumValue
142 Enum(tune_type) String(generic) Value(TUNE_GENERIC)
144 EnumValue
145 Enum(tune_type) String(loongarch64) Value(TUNE_LOONGARCH64)
147 EnumValue
148 Enum(tune_type) String(la464) Value(TUNE_LA464)
150 EnumValue
151 Enum(tune_type) String(la664) Value(TUNE_LA664)
153 mtune=
154 Target RejectNegative Joined Enum(tune_type) Var(la_opt_cpu_tune) Init(M_OPT_UNSET) Save
155 -mtune=PROCESSOR        Generate optimized code for PROCESSOR.
158 ; ABI related options
159 ; (ISA constraints on ABI are handled dynamically)
161 ;; Base ABI
162 Enum
163 Name(abi_base) Type(int)
164 Base ABI types for LoongArch:
166 EnumValue
167 Enum(abi_base) String(lp64d) Value(ABI_BASE_LP64D)
169 EnumValue
170 Enum(abi_base) String(lp64f) Value(ABI_BASE_LP64F)
172 EnumValue
173 Enum(abi_base) String(lp64s) Value(ABI_BASE_LP64S)
175 mabi=
176 Target RejectNegative Joined ToLower Enum(abi_base) Var(la_opt_abi_base) Init(M_OPT_UNSET)
177 -mabi=BASEABI   Generate code that conforms to the given BASEABI.
180 ;; ABI Extension
181 Variable
182 int la_opt_abi_ext = M_OPT_UNSET
184 mbranch-cost=
185 Target RejectNegative Joined UInteger Var(la_branch_cost) Save
186 -mbranch-cost=COST      Set the cost of branches to roughly COST instructions.
188 mcheck-zero-division
189 Target Mask(CHECK_ZERO_DIV) Save
190 Trap on integer divide by zero.
192 mcond-move-int
193 Target Mask(COND_MOVE_INT) Save
194 Conditional moves for integral are enabled.
196 mcond-move-float
197 Target Mask(COND_MOVE_FLOAT) Save
198 Conditional moves for float are enabled.
200 mmemcpy
201 Target Mask(MEMCPY) Save
202 Prevent optimizing block moves, which is also the default behavior of -Os.
204 mstrict-align
205 Target Mask(STRICT_ALIGN) Save
206 Do not generate unaligned memory accesses.
208 mmax-inline-memcpy-size=
209 Target Joined RejectNegative UInteger Var(la_max_inline_memcpy_size) Init(1024) Save
210 -mmax-inline-memcpy-size=SIZE   Set the max size of memcpy to inline, default is 1024.
212 Enum
213 Name(explicit_relocs) Type(int)
214 The code model option names for -mexplicit-relocs:
216 EnumValue
217 Enum(explicit_relocs) String(auto) Value(EXPLICIT_RELOCS_AUTO)
219 EnumValue
220 Enum(explicit_relocs) String(none) Value(EXPLICIT_RELOCS_NONE)
222 EnumValue
223 Enum(explicit_relocs) String(always) Value(EXPLICIT_RELOCS_ALWAYS)
225 mexplicit-relocs=
226 Target RejectNegative Joined Enum(explicit_relocs) Var(la_opt_explicit_relocs) Init(M_OPT_UNSET)
227 Use %reloc() assembly operators.
229 mexplicit-relocs
230 Target Alias(mexplicit-relocs=, always, none)
231 Use %reloc() assembly operators (for backward compatibility).
233 mrecip=
234 Target RejectNegative Joined Var(la_recip_name) Save
235 Control generation of reciprocal estimates.
237 mrecip
238 Target Alias(mrecip=, all, none)
239 Generate approximate reciprocal divide and square root for better throughput.
241 ; The code model option names for -mcmodel.
242 Enum
243 Name(cmodel) Type(int)
244 The code model option names for -mcmodel:
246 EnumValue
247 Enum(cmodel) String(normal) Value(CMODEL_NORMAL)
249 EnumValue
250 Enum(cmodel) String(tiny) Value(CMODEL_TINY)
252 EnumValue
253 Enum(cmodel) String(tiny-static) Value(CMODEL_TINY_STATIC)
255 EnumValue
256 Enum(cmodel) String(medium) Value(CMODEL_MEDIUM)
258 EnumValue
259 Enum(cmodel) String(large) Value(CMODEL_LARGE)
261 EnumValue
262 Enum(cmodel) String(extreme) Value(CMODEL_EXTREME)
264 mcmodel=
265 Target RejectNegative Joined Enum(cmodel) Var(la_opt_cmodel) Init(M_OPT_UNSET) Save
266 Specify the code model.
268 mdirect-extern-access
269 Target Mask(DIRECT_EXTERN_ACCESS) Save
270 Avoid using the GOT to access external symbols.
272 mrelax
273 Target Mask(LINKER_RELAXATION)
274 Take advantage of linker relaxations to reduce the number of instructions
275 required to materialize symbol addresses.
277 mpass-mrelax-to-as
278 Driver Var(la_pass_mrelax_to_as) Init(HAVE_AS_MRELAX_OPTION)
279 Pass -mrelax or -mno-relax option to the assembler.
281 Enum
282 Name(tls_type) Type(int)
283 The possible TLS dialects:
285 EnumValue
286 Enum(tls_type) String(trad) Value(TLS_TRADITIONAL)
288 EnumValue
289 Enum(tls_type) String(desc) Value(TLS_DESCRIPTORS)
291 mtls-dialect=
292 Target RejectNegative Joined Enum(tls_type) Var(la_opt_tls_dialect) Init(M_OPT_UNSET) Save
293 Specify TLS dialect.
295 -param=loongarch-vect-unroll-limit=
296 Target Joined UInteger Var(la_vect_unroll_limit) Init(6) IntegerRange(1, 64) Param
297 Used to limit unroll factor which indicates how much the autovectorizer may
298 unroll a loop.  The default value is 6.
300 -param=loongarch-vect-issue-info=
301 Target Undocumented Joined UInteger Var(la_vect_issue_info) Init(4) IntegerRange(1, 64) Param
302 Indicate how many non memory access vector instructions can be issued per
303 cycle, it's used in unroll factor determination for autovectorizer.  The
304 default value is 4.
306 ; Features added during ISA evolution.  This concept is different from ISA
307 ; extension, read Section 1.5 of LoongArch v1.10 Volume 1 for the
308 ; explanation.  These features may be implemented and enumerated with
309 ; CPUCFG independently, so we use bit flags to specify them.
310 TargetVariable
311 HOST_WIDE_INT la_isa_evolution = 0
313 mannotate-tablejump
314 Target Mask(ANNOTATE_TABLEJUMP) Save
315 Annotate table jump instruction (jr {reg}) to correlate it with the jump table.
317 mfrecipe
318 Target Mask(ISA_FRECIPE) Var(la_isa_evolution)
319 Support frecipe.{s/d} and frsqrte.{s/d} instructions.
321 mdiv32
322 Target Mask(ISA_DIV32) Var(la_isa_evolution)
323 Support div.w[u] and mod.w[u] instructions with inputs not sign-extended.
325 mlam-bh
326 Target Mask(ISA_LAM_BH) Var(la_isa_evolution)
327 Support am{swap/add}[_db].{b/h} instructions.
329 mlamcas
330 Target Mask(ISA_LAMCAS) Var(la_isa_evolution)
331 Support amcas[_db].{b/h/w/d} instructions.
333 mld-seq-sa
334 Target Mask(ISA_LD_SEQ_SA) Var(la_isa_evolution)
335 Do not need load-load barriers (dbar 0x700).