AArch64: Add cost table for Cortex-A76
[official-gcc.git] / gcc / flag-types.h
blob648ed096e30c89e5eca0caeaced7ba3ff57b5666
1 /* Compilation switch flag type definitions for GCC.
2 Copyright (C) 1987-2020 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 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_FLAG_TYPES_H
21 #define GCC_FLAG_TYPES_H
23 #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
25 enum debug_info_type
27 NO_DEBUG, /* Write no debug info. */
28 DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */
29 DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */
30 XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */
31 VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */
32 VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c).
33 and DWARF v2 debug info (using dwarf2out.c). */
36 enum debug_info_levels
38 DINFO_LEVEL_NONE, /* Write no debugging info. */
39 DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */
40 DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */
41 DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */
44 /* A major contribution to object and executable size is debug
45 information size. A major contribution to debug information
46 size is struct descriptions replicated in several object files.
47 The following function determines whether or not debug information
48 should be generated for a given struct. The indirect parameter
49 indicates that the struct is being handled indirectly, via
50 a pointer. See opts.c for the implementation. */
52 enum debug_info_usage
54 DINFO_USAGE_DFN, /* A struct definition. */
55 DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */
56 DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */
57 DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */
60 /* A major contribution to object and executable size is debug
61 information size. A major contribution to debug information size
62 is struct descriptions replicated in several object files. The
63 following flags attempt to reduce this information. The basic
64 idea is to not emit struct debugging information in the current
65 compilation unit when that information will be generated by
66 another compilation unit.
68 Debug information for a struct defined in the current source
69 file should be generated in the object file. Likewise the
70 debug information for a struct defined in a header should be
71 generated in the object file of the corresponding source file.
72 Both of these case are handled when the base name of the file of
73 the struct definition matches the base name of the source file
74 of the current compilation unit. This matching emits minimal
75 struct debugging information.
77 The base file name matching rule above will fail to emit debug
78 information for structs defined in system headers. So a second
79 category of files includes system headers in addition to files
80 with matching bases.
82 The remaining types of files are library headers and application
83 headers. We cannot currently distinguish these two types. */
85 enum debug_struct_file
87 DINFO_STRUCT_FILE_NONE, /* Debug no structs. */
88 DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the
89 same base name as the compilation unit. */
90 DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system
91 header files. */
92 DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */
95 /* Balance between GNAT encodings and standard DWARF to emit. */
97 enum dwarf_gnat_encodings
99 DWARF_GNAT_ENCODINGS_ALL = 0, /* Emit all GNAT encodings, then emit as
100 much standard DWARF as possible so it
101 does not conflict with GNAT
102 encodings. */
103 DWARF_GNAT_ENCODINGS_GDB = 1, /* Emit as much standard DWARF as possible
104 as long as GDB handles them. Emit GNAT
105 encodings for the rest. */
106 DWARF_GNAT_ENCODINGS_MINIMAL = 2 /* Emit all the standard DWARF we can.
107 Emit GNAT encodings for the rest. */
110 /* Enumerate Objective-c instance variable visibility settings. */
112 enum ivar_visibility
114 IVAR_VISIBILITY_PRIVATE,
115 IVAR_VISIBILITY_PROTECTED,
116 IVAR_VISIBILITY_PUBLIC,
117 IVAR_VISIBILITY_PACKAGE
120 /* The stack reuse level. */
121 enum stack_reuse_level
123 SR_NONE,
124 SR_NAMED_VARS,
125 SR_ALL
128 /* The live patching level. */
129 enum live_patching_level
131 LIVE_PATCHING_NONE = 0,
132 LIVE_PATCHING_INLINE_ONLY_STATIC,
133 LIVE_PATCHING_INLINE_CLONE
136 /* The algorithm used for basic block reordering. */
137 enum reorder_blocks_algorithm
139 REORDER_BLOCKS_ALGORITHM_SIMPLE,
140 REORDER_BLOCKS_ALGORITHM_STC
143 /* The algorithm used for the integrated register allocator (IRA). */
144 enum ira_algorithm
146 IRA_ALGORITHM_CB,
147 IRA_ALGORITHM_PRIORITY
150 /* The regions used for the integrated register allocator (IRA). */
151 enum ira_region
153 IRA_REGION_ONE,
154 IRA_REGION_ALL,
155 IRA_REGION_MIXED,
156 /* This value means that there were no options -fira-region on the
157 command line and that we should choose a value depending on the
158 used -O option. */
159 IRA_REGION_AUTODETECT
162 /* The options for excess precision. */
163 enum excess_precision
165 EXCESS_PRECISION_DEFAULT,
166 EXCESS_PRECISION_FAST,
167 EXCESS_PRECISION_STANDARD
170 /* The options for which values of FLT_EVAL_METHOD are permissible. */
171 enum permitted_flt_eval_methods
173 PERMITTED_FLT_EVAL_METHODS_DEFAULT,
174 PERMITTED_FLT_EVAL_METHODS_TS_18661,
175 PERMITTED_FLT_EVAL_METHODS_C11
178 /* Type of stack check.
180 Stack checking is designed to detect infinite recursion and stack
181 overflows for Ada programs. Furthermore stack checking tries to ensure
182 in that scenario that enough stack space is left to run a signal handler.
184 -fstack-check= does not prevent stack-clash style attacks. For that
185 you want -fstack-clash-protection. */
186 enum stack_check_type
188 /* Do not check the stack. */
189 NO_STACK_CHECK = 0,
191 /* Check the stack generically, i.e. assume no specific support
192 from the target configuration files. */
193 GENERIC_STACK_CHECK,
195 /* Check the stack and rely on the target configuration files to
196 check the static frame of functions, i.e. use the generic
197 mechanism only for dynamic stack allocations. */
198 STATIC_BUILTIN_STACK_CHECK,
200 /* Check the stack and entirely rely on the target configuration
201 files, i.e. do not use the generic mechanism at all. */
202 FULL_BUILTIN_STACK_CHECK
205 /* Type of callgraph information. */
206 enum callgraph_info_type
208 /* No information. */
209 NO_CALLGRAPH_INFO = 0,
211 /* Naked callgraph. */
212 CALLGRAPH_INFO_NAKED = 1,
214 /* Callgraph decorated with stack usage information. */
215 CALLGRAPH_INFO_STACK_USAGE = 2,
217 /* Callgraph decoration with dynamic allocation information. */
218 CALLGRAPH_INFO_DYNAMIC_ALLOC = 4
221 /* Floating-point contraction mode. */
222 enum fp_contract_mode {
223 FP_CONTRACT_OFF = 0,
224 FP_CONTRACT_ON = 1,
225 FP_CONTRACT_FAST = 2
228 /* Scalar storage order kind. */
229 enum scalar_storage_order_kind {
230 SSO_NATIVE = 0,
231 SSO_BIG_ENDIAN,
232 SSO_LITTLE_ENDIAN
235 /* Vectorizer cost-model. */
236 enum vect_cost_model {
237 VECT_COST_MODEL_UNLIMITED = 0,
238 VECT_COST_MODEL_CHEAP = 1,
239 VECT_COST_MODEL_DYNAMIC = 2,
240 VECT_COST_MODEL_DEFAULT = 3
243 /* Different instrumentation modes. */
244 enum sanitize_code {
245 /* AddressSanitizer. */
246 SANITIZE_ADDRESS = 1UL << 0,
247 SANITIZE_USER_ADDRESS = 1UL << 1,
248 SANITIZE_KERNEL_ADDRESS = 1UL << 2,
249 /* ThreadSanitizer. */
250 SANITIZE_THREAD = 1UL << 3,
251 /* LeakSanitizer. */
252 SANITIZE_LEAK = 1UL << 4,
253 /* UndefinedBehaviorSanitizer. */
254 SANITIZE_SHIFT_BASE = 1UL << 5,
255 SANITIZE_SHIFT_EXPONENT = 1UL << 6,
256 SANITIZE_DIVIDE = 1UL << 7,
257 SANITIZE_UNREACHABLE = 1UL << 8,
258 SANITIZE_VLA = 1UL << 9,
259 SANITIZE_NULL = 1UL << 10,
260 SANITIZE_RETURN = 1UL << 11,
261 SANITIZE_SI_OVERFLOW = 1UL << 12,
262 SANITIZE_BOOL = 1UL << 13,
263 SANITIZE_ENUM = 1UL << 14,
264 SANITIZE_FLOAT_DIVIDE = 1UL << 15,
265 SANITIZE_FLOAT_CAST = 1UL << 16,
266 SANITIZE_BOUNDS = 1UL << 17,
267 SANITIZE_ALIGNMENT = 1UL << 18,
268 SANITIZE_NONNULL_ATTRIBUTE = 1UL << 19,
269 SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 20,
270 SANITIZE_OBJECT_SIZE = 1UL << 21,
271 SANITIZE_VPTR = 1UL << 22,
272 SANITIZE_BOUNDS_STRICT = 1UL << 23,
273 SANITIZE_POINTER_OVERFLOW = 1UL << 24,
274 SANITIZE_BUILTIN = 1UL << 25,
275 SANITIZE_POINTER_COMPARE = 1UL << 26,
276 SANITIZE_POINTER_SUBTRACT = 1UL << 27,
277 SANITIZE_SHIFT = SANITIZE_SHIFT_BASE | SANITIZE_SHIFT_EXPONENT,
278 SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE
279 | SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN
280 | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM
281 | SANITIZE_BOUNDS | SANITIZE_ALIGNMENT
282 | SANITIZE_NONNULL_ATTRIBUTE
283 | SANITIZE_RETURNS_NONNULL_ATTRIBUTE
284 | SANITIZE_OBJECT_SIZE | SANITIZE_VPTR
285 | SANITIZE_POINTER_OVERFLOW | SANITIZE_BUILTIN,
286 SANITIZE_UNDEFINED_NONDEFAULT = SANITIZE_FLOAT_DIVIDE | SANITIZE_FLOAT_CAST
287 | SANITIZE_BOUNDS_STRICT
290 /* Different settings for zeroing subset of registers. */
291 namespace zero_regs_flags {
292 const unsigned int UNSET = 0;
293 const unsigned int SKIP = 1UL << 0;
294 const unsigned int ONLY_USED = 1UL << 1;
295 const unsigned int ONLY_GPR = 1UL << 2;
296 const unsigned int ONLY_ARG = 1UL << 3;
297 const unsigned int ENABLED = 1UL << 4;
298 const unsigned int USED_GPR_ARG = ENABLED | ONLY_USED | ONLY_GPR | ONLY_ARG;
299 const unsigned int USED_GPR = ENABLED | ONLY_USED | ONLY_GPR;
300 const unsigned int USED_ARG = ENABLED | ONLY_USED | ONLY_ARG;
301 const unsigned int USED = ENABLED | ONLY_USED;
302 const unsigned int ALL_GPR_ARG = ENABLED | ONLY_GPR | ONLY_ARG;
303 const unsigned int ALL_GPR = ENABLED | ONLY_GPR;
304 const unsigned int ALL_ARG = ENABLED | ONLY_ARG;
305 const unsigned int ALL = ENABLED;
308 /* Settings of flag_incremental_link. */
309 enum incremental_link {
310 INCREMENTAL_LINK_NONE,
311 /* Do incremental linking and produce binary. */
312 INCREMENTAL_LINK_NOLTO,
313 /* Do incremental linking and produce IL. */
314 INCREMENTAL_LINK_LTO
317 /* Different trace modes. */
318 enum sanitize_coverage_code {
319 /* Trace PC. */
320 SANITIZE_COV_TRACE_PC = 1 << 0,
321 /* Trace Comparison. */
322 SANITIZE_COV_TRACE_CMP = 1 << 1
325 /* flag_vtable_verify initialization levels. */
326 enum vtv_priority {
327 VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */
328 VTV_STANDARD_PRIORITY = 1,
329 VTV_PREINIT_PRIORITY = 2
332 /* flag_lto_partition initialization values. */
333 enum lto_partition_model {
334 LTO_PARTITION_NONE = 0,
335 LTO_PARTITION_ONE = 1,
336 LTO_PARTITION_BALANCED = 2,
337 LTO_PARTITION_1TO1 = 3,
338 LTO_PARTITION_MAX = 4
341 /* flag_lto_linker_output initialization values. */
342 enum lto_linker_output {
343 LTO_LINKER_OUTPUT_UNKNOWN,
344 LTO_LINKER_OUTPUT_REL,
345 LTO_LINKER_OUTPUT_NOLTOREL,
346 LTO_LINKER_OUTPUT_DYN,
347 LTO_LINKER_OUTPUT_PIE,
348 LTO_LINKER_OUTPUT_EXEC
351 /* gfortran -finit-real= values. */
353 enum gfc_init_local_real
355 GFC_INIT_REAL_OFF = 0,
356 GFC_INIT_REAL_ZERO,
357 GFC_INIT_REAL_NAN,
358 GFC_INIT_REAL_SNAN,
359 GFC_INIT_REAL_INF,
360 GFC_INIT_REAL_NEG_INF
363 /* gfortran -fcoarray= values. */
365 enum gfc_fcoarray
367 GFC_FCOARRAY_NONE = 0,
368 GFC_FCOARRAY_SINGLE,
369 GFC_FCOARRAY_LIB
373 /* gfortran -fconvert= values; used for unformatted I/O.
374 Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */
375 enum gfc_convert
377 GFC_FLAG_CONVERT_NATIVE = 0,
378 GFC_FLAG_CONVERT_SWAP,
379 GFC_FLAG_CONVERT_BIG,
380 GFC_FLAG_CONVERT_LITTLE
384 /* Control-Flow Protection values. */
385 enum cf_protection_level
387 CF_NONE = 0,
388 CF_BRANCH = 1 << 0,
389 CF_RETURN = 1 << 1,
390 CF_FULL = CF_BRANCH | CF_RETURN,
391 CF_SET = 1 << 2,
392 CF_CHECK = 1 << 3
395 /* Parloops schedule type. */
396 enum parloops_schedule_type
398 PARLOOPS_SCHEDULE_STATIC = 0,
399 PARLOOPS_SCHEDULE_DYNAMIC,
400 PARLOOPS_SCHEDULE_GUIDED,
401 PARLOOPS_SCHEDULE_AUTO,
402 PARLOOPS_SCHEDULE_RUNTIME
405 /* EVRP mode. */
406 enum evrp_mode
408 EVRP_MODE_EVRP_FIRST = 0,
409 EVRP_MODE_EVRP_ONLY = 1,
410 EVRP_MODE_RVRP_ONLY = 2,
411 EVRP_MODE_RVRP_FIRST = 3,
412 EVRP_MODE_TRACE = 4,
413 EVRP_MODE_DEBUG = 8 | EVRP_MODE_TRACE,
414 EVRP_MODE_RVRP_TRACE = EVRP_MODE_RVRP_ONLY | EVRP_MODE_TRACE,
415 EVRP_MODE_RVRP_DEBUG = EVRP_MODE_RVRP_ONLY | EVRP_MODE_DEBUG
418 /* Modes of OpenACC 'kernels' constructs handling. */
419 enum openacc_kernels
421 OPENACC_KERNELS_DECOMPOSE,
422 OPENACC_KERNELS_PARLOOPS
425 #endif
427 #endif /* ! GCC_FLAG_TYPES_H */