| 1 |
/* Compilation switch flag type definitions for GCC. |
| 2 |
Copyright (C) 1987-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 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. |
| 10 |
|
| 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. |
| 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_FLAG_TYPES_H |
| 21 |
#define GCC_FLAG_TYPES_H |
| 22 |
|
| 23 |
#if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) |
| 24 |
|
| 25 |
enum debug_info_type |
| 26 |
{ |
| 27 |
DINFO_TYPE_NONE, /* No debug info. */ |
| 28 |
DINFO_TYPE_DWARF2, /* Dwarf v2 debug info. */ |
| 29 |
DINFO_TYPE_VMS, /* VMS debug info. */ |
| 30 |
DINFO_TYPE_CTF, /* CTF debug info. */ |
| 31 |
DINFO_TYPE_BTF, /* BTF debug info. */ |
| 32 |
DINFO_TYPE_CODEVIEW, /* CodeView debug info. */ |
| 33 |
DINFO_TYPE_BTF_WITH_CORE, /* BTF debug info with CO-RE relocations. */ |
| 34 |
DINFO_TYPE_MAX = DINFO_TYPE_BTF_WITH_CORE /* Marker only. */ |
| 35 |
}; |
| 36 |
|
| 37 |
#define NO_DEBUG (0U) |
| 38 |
/* Write DWARF2 debug info (using dwarf2out.cc). */ |
| 39 |
#define DWARF2_DEBUG (1U << DINFO_TYPE_DWARF2) |
| 40 |
/* Write VMS debug info (using vmsdbgout.cc). */ |
| 41 |
#define VMS_DEBUG (1U << DINFO_TYPE_VMS) |
| 42 |
/* Write CTF debug info (using ctfout.cc). */ |
| 43 |
#define CTF_DEBUG (1U << DINFO_TYPE_CTF) |
| 44 |
/* Write BTF debug info (using btfout.cc). */ |
| 45 |
#define BTF_DEBUG (1U << DINFO_TYPE_BTF) |
| 46 |
/* Write CodeView debug info (using dwarf2codeview.cc). */ |
| 47 |
#define CODEVIEW_DEBUG (1U << DINFO_TYPE_CODEVIEW) |
| 48 |
/* Write BTF debug info for BPF CO-RE usecase (using btfout.cc). */ |
| 49 |
#define BTF_WITH_CORE_DEBUG (1U << DINFO_TYPE_BTF_WITH_CORE) |
| 50 |
|
| 51 |
/* Note: Adding new definitions to handle -combination- of debug formats, |
| 52 |
like VMS_AND_DWARF2_DEBUG is not recommended. This definition remains |
| 53 |
here for historical reasons. */ |
| 54 |
/* Write VMS debug info (using vmsdbgout.cc) and DWARF v2 debug info (using |
| 55 |
dwarf2out.cc). */ |
| 56 |
#define VMS_AND_DWARF2_DEBUG ((VMS_DEBUG | DWARF2_DEBUG)) |
| 57 |
|
| 58 |
enum debug_info_levels |
| 59 |
{ |
| 60 |
DINFO_LEVEL_NONE, /* Write no debugging info. */ |
| 61 |
DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */ |
| 62 |
DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */ |
| 63 |
DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */ |
| 64 |
}; |
| 65 |
|
| 66 |
/* CTF debug info levels. |
| 67 |
CTF debug info levels are untied with DWARF debug info levels because CTF |
| 68 |
may co-exist with DWARF. */ |
| 69 |
enum ctf_debug_info_levels |
| 70 |
{ |
| 71 |
CTFINFO_LEVEL_NONE = 0, /* Write no CTF debug info. */ |
| 72 |
CTFINFO_LEVEL_TERSE = 1, /* Write CTF information to support tracebacks |
| 73 |
only. Not Implemented. */ |
| 74 |
CTFINFO_LEVEL_NORMAL = 2 /* Write CTF type information for all entities |
| 75 |
(functions, data objects, variables etc.) |
| 76 |
at file-scope or global-scope only. */ |
| 77 |
}; |
| 78 |
|
| 79 |
/* A major contribution to object and executable size is debug |
| 80 |
information size. A major contribution to debug information |
| 81 |
size is struct descriptions replicated in several object files. |
| 82 |
The following function determines whether or not debug information |
| 83 |
should be generated for a given struct. The indirect parameter |
| 84 |
indicates that the struct is being handled indirectly, via |
| 85 |
a pointer. See opts.cc for the implementation. */ |
| 86 |
|
| 87 |
enum debug_info_usage |
| 88 |
{ |
| 89 |
DINFO_USAGE_DFN, /* A struct definition. */ |
| 90 |
DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */ |
| 91 |
DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */ |
| 92 |
DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */ |
| 93 |
}; |
| 94 |
|
| 95 |
/* A major contribution to object and executable size is debug |
| 96 |
information size. A major contribution to debug information size |
| 97 |
is struct descriptions replicated in several object files. The |
| 98 |
following flags attempt to reduce this information. The basic |
| 99 |
idea is to not emit struct debugging information in the current |
| 100 |
compilation unit when that information will be generated by |
| 101 |
another compilation unit. |
| 102 |
|
| 103 |
Debug information for a struct defined in the current source |
| 104 |
file should be generated in the object file. Likewise the |
| 105 |
debug information for a struct defined in a header should be |
| 106 |
generated in the object file of the corresponding source file. |
| 107 |
Both of these case are handled when the base name of the file of |
| 108 |
the struct definition matches the base name of the source file |
| 109 |
of the current compilation unit. This matching emits minimal |
| 110 |
struct debugging information. |
| 111 |
|
| 112 |
The base file name matching rule above will fail to emit debug |
| 113 |
information for structs defined in system headers. So a second |
| 114 |
category of files includes system headers in addition to files |
| 115 |
with matching bases. |
| 116 |
|
| 117 |
The remaining types of files are library headers and application |
| 118 |
headers. We cannot currently distinguish these two types. */ |
| 119 |
|
| 120 |
enum debug_struct_file |
| 121 |
{ |
| 122 |
DINFO_STRUCT_FILE_NONE, /* Debug no structs. */ |
| 123 |
DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the |
| 124 |
same base name as the compilation unit. */ |
| 125 |
DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system |
| 126 |
header files. */ |
| 127 |
DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */ |
| 128 |
}; |
| 129 |
|
| 130 |
/* Balance between GNAT encodings and standard DWARF to emit. */ |
| 131 |
|
| 132 |
enum dwarf_gnat_encodings |
| 133 |
{ |
| 134 |
DWARF_GNAT_ENCODINGS_ALL = 0, /* Emit all GNAT encodings, then emit as |
| 135 |
much standard DWARF as possible so it |
| 136 |
does not conflict with GNAT |
| 137 |
encodings. */ |
| 138 |
DWARF_GNAT_ENCODINGS_GDB = 1, /* Emit as much standard DWARF as possible |
| 139 |
as long as GDB handles them. Emit GNAT |
| 140 |
encodings for the rest. */ |
| 141 |
DWARF_GNAT_ENCODINGS_MINIMAL = 2 /* Emit all the standard DWARF we can. |
| 142 |
Emit GNAT encodings for the rest. */ |
| 143 |
}; |
| 144 |
|
| 145 |
/* Enumerate Objective-c instance variable visibility settings. */ |
| 146 |
|
| 147 |
enum ivar_visibility |
| 148 |
{ |
| 149 |
IVAR_VISIBILITY_PRIVATE, |
| 150 |
IVAR_VISIBILITY_PROTECTED, |
| 151 |
IVAR_VISIBILITY_PUBLIC, |
| 152 |
IVAR_VISIBILITY_PACKAGE |
| 153 |
}; |
| 154 |
|
| 155 |
/* The stack reuse level. */ |
| 156 |
enum stack_reuse_level |
| 157 |
{ |
| 158 |
SR_NONE, |
| 159 |
SR_NAMED_VARS, |
| 160 |
SR_ALL |
| 161 |
}; |
| 162 |
|
| 163 |
/* Control Flow Redundancy hardening options for noreturn calls. */ |
| 164 |
enum hardcfr_noret |
| 165 |
{ |
| 166 |
HCFRNR_NEVER, |
| 167 |
HCFRNR_NOTHROW, |
| 168 |
HCFRNR_NO_XTHROW, |
| 169 |
HCFRNR_UNSPECIFIED, |
| 170 |
HCFRNR_ALWAYS, |
| 171 |
}; |
| 172 |
|
| 173 |
/* The live patching level. */ |
| 174 |
enum live_patching_level |
| 175 |
{ |
| 176 |
LIVE_PATCHING_NONE = 0, |
| 177 |
LIVE_PATCHING_INLINE_ONLY_STATIC, |
| 178 |
LIVE_PATCHING_INLINE_CLONE |
| 179 |
}; |
| 180 |
|
| 181 |
/* The algorithm used for basic block reordering. */ |
| 182 |
enum reorder_blocks_algorithm |
| 183 |
{ |
| 184 |
REORDER_BLOCKS_ALGORITHM_SIMPLE, |
| 185 |
REORDER_BLOCKS_ALGORITHM_STC |
| 186 |
}; |
| 187 |
|
| 188 |
/* The algorithm used for the integrated register allocator (IRA). */ |
| 189 |
enum ira_algorithm |
| 190 |
{ |
| 191 |
IRA_ALGORITHM_CB, |
| 192 |
IRA_ALGORITHM_PRIORITY |
| 193 |
}; |
| 194 |
|
| 195 |
/* The regions used for the integrated register allocator (IRA). */ |
| 196 |
enum ira_region |
| 197 |
{ |
| 198 |
IRA_REGION_ONE, |
| 199 |
IRA_REGION_ALL, |
| 200 |
IRA_REGION_MIXED, |
| 201 |
}; |
| 202 |
|
| 203 |
/* The options for excess precision. */ |
| 204 |
enum excess_precision |
| 205 |
{ |
| 206 |
EXCESS_PRECISION_DEFAULT, |
| 207 |
EXCESS_PRECISION_FAST, |
| 208 |
EXCESS_PRECISION_STANDARD, |
| 209 |
EXCESS_PRECISION_FLOAT16 |
| 210 |
}; |
| 211 |
|
| 212 |
/* The options for which values of FLT_EVAL_METHOD are permissible. */ |
| 213 |
enum permitted_flt_eval_methods |
| 214 |
{ |
| 215 |
PERMITTED_FLT_EVAL_METHODS_DEFAULT, |
| 216 |
PERMITTED_FLT_EVAL_METHODS_TS_18661, |
| 217 |
PERMITTED_FLT_EVAL_METHODS_C11 |
| 218 |
}; |
| 219 |
|
| 220 |
/* Type of stack check. |
| 221 |
|
| 222 |
Stack checking is designed to detect infinite recursion and stack |
| 223 |
overflows for Ada programs. Furthermore stack checking tries to ensure |
| 224 |
in that scenario that enough stack space is left to run a signal handler. |
| 225 |
|
| 226 |
-fstack-check= does not prevent stack-clash style attacks. For that |
| 227 |
you want -fstack-clash-protection. */ |
| 228 |
enum stack_check_type |
| 229 |
{ |
| 230 |
/* Do not check the stack. */ |
| 231 |
NO_STACK_CHECK = 0, |
| 232 |
|
| 233 |
/* Check the stack generically, i.e. assume no specific support |
| 234 |
from the target configuration files. */ |
| 235 |
GENERIC_STACK_CHECK, |
| 236 |
|
| 237 |
/* Check the stack and rely on the target configuration files to |
| 238 |
check the static frame of functions, i.e. use the generic |
| 239 |
mechanism only for dynamic stack allocations. */ |
| 240 |
STATIC_BUILTIN_STACK_CHECK, |
| 241 |
|
| 242 |
/* Check the stack and entirely rely on the target configuration |
| 243 |
files, i.e. do not use the generic mechanism at all. */ |
| 244 |
FULL_BUILTIN_STACK_CHECK |
| 245 |
}; |
| 246 |
|
| 247 |
/* Type of callgraph information. */ |
| 248 |
enum callgraph_info_type |
| 249 |
{ |
| 250 |
/* No information. */ |
| 251 |
NO_CALLGRAPH_INFO = 0, |
| 252 |
|
| 253 |
/* Naked callgraph. */ |
| 254 |
CALLGRAPH_INFO_NAKED = 1, |
| 255 |
|
| 256 |
/* Callgraph decorated with stack usage information. */ |
| 257 |
CALLGRAPH_INFO_STACK_USAGE = 2, |
| 258 |
|
| 259 |
/* Callgraph decoration with dynamic allocation information. */ |
| 260 |
CALLGRAPH_INFO_DYNAMIC_ALLOC = 4 |
| 261 |
}; |
| 262 |
|
| 263 |
/* Floating-point contraction mode. */ |
| 264 |
enum fp_contract_mode { |
| 265 |
FP_CONTRACT_OFF = 0, |
| 266 |
FP_CONTRACT_ON = 1, |
| 267 |
FP_CONTRACT_FAST = 2 |
| 268 |
}; |
| 269 |
|
| 270 |
/* Scalar storage order kind. */ |
| 271 |
enum scalar_storage_order_kind { |
| 272 |
SSO_NATIVE = 0, |
| 273 |
SSO_BIG_ENDIAN, |
| 274 |
SSO_LITTLE_ENDIAN |
| 275 |
}; |
| 276 |
|
| 277 |
/* Vectorizer cost-model. Except for DEFAULT, the values are ordered from |
| 278 |
the most conservative to the least conservative. */ |
| 279 |
enum vect_cost_model { |
| 280 |
VECT_COST_MODEL_VERY_CHEAP = -3, |
| 281 |
VECT_COST_MODEL_CHEAP = -2, |
| 282 |
VECT_COST_MODEL_DYNAMIC = -1, |
| 283 |
VECT_COST_MODEL_UNLIMITED = 0, |
| 284 |
VECT_COST_MODEL_DEFAULT = 1 |
| 285 |
}; |
| 286 |
|
| 287 |
/* Automatic variable initialization type. */ |
| 288 |
enum auto_init_type { |
| 289 |
AUTO_INIT_UNINITIALIZED = 0, |
| 290 |
AUTO_INIT_PATTERN = 1, |
| 291 |
AUTO_INIT_ZERO = 2 |
| 292 |
}; |
| 293 |
|
| 294 |
/* Initialization of padding bits with zeros. */ |
| 295 |
enum zero_init_padding_bits_kind { |
| 296 |
ZERO_INIT_PADDING_BITS_STANDARD = 0, |
| 297 |
ZERO_INIT_PADDING_BITS_UNIONS = 1, |
| 298 |
ZERO_INIT_PADDING_BITS_ALL = 2 |
| 299 |
}; |
| 300 |
|
| 301 |
/* Different instrumentation modes. */ |
| 302 |
enum sanitize_code { |
| 303 |
/* AddressSanitizer. */ |
| 304 |
SANITIZE_ADDRESS = 1UL << 0, |
| 305 |
SANITIZE_USER_ADDRESS = 1UL << 1, |
| 306 |
SANITIZE_KERNEL_ADDRESS = 1UL << 2, |
| 307 |
/* ThreadSanitizer. */ |
| 308 |
SANITIZE_THREAD = 1UL << 3, |
| 309 |
/* LeakSanitizer. */ |
| 310 |
SANITIZE_LEAK = 1UL << 4, |
| 311 |
/* UndefinedBehaviorSanitizer. */ |
| 312 |
SANITIZE_SHIFT_BASE = 1UL << 5, |
| 313 |
SANITIZE_SHIFT_EXPONENT = 1UL << 6, |
| 314 |
SANITIZE_DIVIDE = 1UL << 7, |
| 315 |
SANITIZE_UNREACHABLE = 1UL << 8, |
| 316 |
SANITIZE_VLA = 1UL << 9, |
| 317 |
SANITIZE_NULL = 1UL << 10, |
| 318 |
SANITIZE_RETURN = 1UL << 11, |
| 319 |
SANITIZE_SI_OVERFLOW = 1UL << 12, |
| 320 |
SANITIZE_BOOL = 1UL << 13, |
| 321 |
SANITIZE_ENUM = 1UL << 14, |
| 322 |
SANITIZE_FLOAT_DIVIDE = 1UL << 15, |
| 323 |
SANITIZE_FLOAT_CAST = 1UL << 16, |
| 324 |
SANITIZE_BOUNDS = 1UL << 17, |
| 325 |
SANITIZE_ALIGNMENT = 1UL << 18, |
| 326 |
SANITIZE_NONNULL_ATTRIBUTE = 1UL << 19, |
| 327 |
SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 20, |
| 328 |
SANITIZE_OBJECT_SIZE = 1UL << 21, |
| 329 |
SANITIZE_VPTR = 1UL << 22, |
| 330 |
SANITIZE_BOUNDS_STRICT = 1UL << 23, |
| 331 |
SANITIZE_POINTER_OVERFLOW = 1UL << 24, |
| 332 |
SANITIZE_BUILTIN = 1UL << 25, |
| 333 |
SANITIZE_POINTER_COMPARE = 1UL << 26, |
| 334 |
SANITIZE_POINTER_SUBTRACT = 1UL << 27, |
| 335 |
SANITIZE_HWADDRESS = 1UL << 28, |
| 336 |
SANITIZE_USER_HWADDRESS = 1UL << 29, |
| 337 |
SANITIZE_KERNEL_HWADDRESS = 1UL << 30, |
| 338 |
/* Shadow Call Stack. */ |
| 339 |
SANITIZE_SHADOW_CALL_STACK = 1UL << 31, |
| 340 |
SANITIZE_SHIFT = SANITIZE_SHIFT_BASE | SANITIZE_SHIFT_EXPONENT, |
| 341 |
SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE |
| 342 |
| SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN |
| 343 |
| SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM |
| 344 |
| SANITIZE_BOUNDS | SANITIZE_ALIGNMENT |
| 345 |
| SANITIZE_NONNULL_ATTRIBUTE |
| 346 |
| SANITIZE_RETURNS_NONNULL_ATTRIBUTE |
| 347 |
| SANITIZE_OBJECT_SIZE | SANITIZE_VPTR |
| 348 |
| SANITIZE_POINTER_OVERFLOW | SANITIZE_BUILTIN, |
| 349 |
SANITIZE_UNDEFINED_NONDEFAULT = SANITIZE_FLOAT_DIVIDE | SANITIZE_FLOAT_CAST |
| 350 |
| SANITIZE_BOUNDS_STRICT |
| 351 |
}; |
| 352 |
|
| 353 |
/* Different settings for zeroing subset of registers. */ |
| 354 |
namespace zero_regs_flags { |
| 355 |
const unsigned int UNSET = 0; |
| 356 |
const unsigned int SKIP = 1UL << 0; |
| 357 |
const unsigned int ONLY_USED = 1UL << 1; |
| 358 |
const unsigned int ONLY_GPR = 1UL << 2; |
| 359 |
const unsigned int ONLY_ARG = 1UL << 3; |
| 360 |
const unsigned int ENABLED = 1UL << 4; |
| 361 |
const unsigned int LEAFY_MODE = 1UL << 5; |
| 362 |
const unsigned int USED_GPR_ARG = ENABLED | ONLY_USED | ONLY_GPR | ONLY_ARG; |
| 363 |
const unsigned int USED_GPR = ENABLED | ONLY_USED | ONLY_GPR; |
| 364 |
const unsigned int USED_ARG = ENABLED | ONLY_USED | ONLY_ARG; |
| 365 |
const unsigned int USED = ENABLED | ONLY_USED; |
| 366 |
const unsigned int ALL_GPR_ARG = ENABLED | ONLY_GPR | ONLY_ARG; |
| 367 |
const unsigned int ALL_GPR = ENABLED | ONLY_GPR; |
| 368 |
const unsigned int ALL_ARG = ENABLED | ONLY_ARG; |
| 369 |
const unsigned int ALL = ENABLED; |
| 370 |
const unsigned int LEAFY_GPR_ARG = ENABLED | LEAFY_MODE | ONLY_GPR | ONLY_ARG; |
| 371 |
const unsigned int LEAFY_GPR = ENABLED | LEAFY_MODE | ONLY_GPR; |
| 372 |
const unsigned int LEAFY_ARG = ENABLED | LEAFY_MODE | ONLY_ARG; |
| 373 |
const unsigned int LEAFY = ENABLED | LEAFY_MODE; |
| 374 |
} |
| 375 |
|
| 376 |
/* Settings of flag_incremental_link. */ |
| 377 |
enum incremental_link { |
| 378 |
INCREMENTAL_LINK_NONE, |
| 379 |
/* Do incremental linking and produce binary. */ |
| 380 |
INCREMENTAL_LINK_NOLTO, |
| 381 |
/* Do incremental linking and produce IL. */ |
| 382 |
INCREMENTAL_LINK_LTO |
| 383 |
}; |
| 384 |
|
| 385 |
/* Different trace modes. */ |
| 386 |
enum sanitize_coverage_code { |
| 387 |
/* Trace PC. */ |
| 388 |
SANITIZE_COV_TRACE_PC = 1 << 0, |
| 389 |
/* Trace Comparison. */ |
| 390 |
SANITIZE_COV_TRACE_CMP = 1 << 1 |
| 391 |
}; |
| 392 |
|
| 393 |
/* flag_vtable_verify initialization levels. */ |
| 394 |
enum vtv_priority { |
| 395 |
VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */ |
| 396 |
VTV_STANDARD_PRIORITY = 1, |
| 397 |
VTV_PREINIT_PRIORITY = 2 |
| 398 |
}; |
| 399 |
|
| 400 |
/* flag_lto_partition initialization values. */ |
| 401 |
enum lto_partition_model { |
| 402 |
LTO_PARTITION_NONE = 0, |
| 403 |
LTO_PARTITION_ONE = 1, |
| 404 |
LTO_PARTITION_BALANCED = 2, |
| 405 |
LTO_PARTITION_1TO1 = 3, |
| 406 |
LTO_PARTITION_MAX = 4, |
| 407 |
LTO_PARTITION_CACHE = 5 |
| 408 |
}; |
| 409 |
|
| 410 |
/* flag_lto_locality_cloning initialization values. */ |
| 411 |
enum lto_locality_cloning_model { |
| 412 |
LTO_LOCALITY_NO_CLONING = 0, |
| 413 |
LTO_LOCALITY_NON_INTERPOSABLE_CLONING = 1, |
| 414 |
LTO_LOCALITY_MAXIMAL_CLONING = 2, |
| 415 |
}; |
| 416 |
|
| 417 |
/* flag_lto_linker_output initialization values. */ |
| 418 |
enum lto_linker_output { |
| 419 |
LTO_LINKER_OUTPUT_UNKNOWN, |
| 420 |
LTO_LINKER_OUTPUT_REL, |
| 421 |
LTO_LINKER_OUTPUT_NOLTOREL, |
| 422 |
LTO_LINKER_OUTPUT_DYN, |
| 423 |
LTO_LINKER_OUTPUT_PIE, |
| 424 |
LTO_LINKER_OUTPUT_EXEC |
| 425 |
}; |
| 426 |
|
| 427 |
/* gfortran -finit-real= values. */ |
| 428 |
|
| 429 |
enum gfc_init_local_real |
| 430 |
{ |
| 431 |
GFC_INIT_REAL_OFF = 0, |
| 432 |
GFC_INIT_REAL_ZERO, |
| 433 |
GFC_INIT_REAL_NAN, |
| 434 |
GFC_INIT_REAL_SNAN, |
| 435 |
GFC_INIT_REAL_INF, |
| 436 |
GFC_INIT_REAL_NEG_INF |
| 437 |
}; |
| 438 |
|
| 439 |
/* gfortran -fcoarray= values. */ |
| 440 |
|
| 441 |
enum gfc_fcoarray |
| 442 |
{ |
| 443 |
GFC_FCOARRAY_NONE = 0, |
| 444 |
GFC_FCOARRAY_SINGLE, |
| 445 |
GFC_FCOARRAY_LIB |
| 446 |
}; |
| 447 |
|
| 448 |
|
| 449 |
/* gfortran -fconvert= values; used for unformatted I/O. |
| 450 |
Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */ |
| 451 |
enum gfc_convert |
| 452 |
{ |
| 453 |
GFC_FLAG_CONVERT_NATIVE = 0, |
| 454 |
GFC_FLAG_CONVERT_SWAP, |
| 455 |
GFC_FLAG_CONVERT_BIG, |
| 456 |
GFC_FLAG_CONVERT_LITTLE, |
| 457 |
GFC_FLAG_CONVERT_R16_IEEE = 4, |
| 458 |
GFC_FLAG_CONVERT_R16_IEEE_SWAP, |
| 459 |
GFC_FLAG_CONVERT_R16_IEEE_BIG, |
| 460 |
GFC_FLAG_CONVERT_R16_IEEE_LITTLE, |
| 461 |
GFC_FLAG_CONVERT_R16_IBM = 8, |
| 462 |
GFC_FLAG_CONVERT_R16_IBM_SWAP, |
| 463 |
GFC_FLAG_CONVERT_R16_IBM_BIG, |
| 464 |
GFC_FLAG_CONVERT_R16_IBM_LITTLE, |
| 465 |
}; |
| 466 |
|
| 467 |
|
| 468 |
/* gfortran -finline-intrinsics= values; |
| 469 |
We use two identical bits for each value, and initialize with alternated |
| 470 |
bits, so that we can check whether a value has been set by checking whether |
| 471 |
the two bits have identical value. */ |
| 472 |
|
| 473 |
#define GFC_INL_INTR_VAL(idx) (3 << (2 * idx)) |
| 474 |
#define GFC_INL_INTR_UNSET_VAL(val) (0x55555555 & (val)) |
| 475 |
|
| 476 |
enum gfc_inlineable_intrinsics |
| 477 |
{ |
| 478 |
GFC_FLAG_INLINE_INTRINSIC_NONE = 0, |
| 479 |
GFC_FLAG_INLINE_INTRINSIC_MAXLOC = GFC_INL_INTR_VAL (0), |
| 480 |
GFC_FLAG_INLINE_INTRINSIC_MINLOC = GFC_INL_INTR_VAL (1), |
| 481 |
GFC_FLAG_INLINE_INTRINSIC_ALL = GFC_FLAG_INLINE_INTRINSIC_MAXLOC |
| 482 |
| GFC_FLAG_INLINE_INTRINSIC_MINLOC, |
| 483 |
|
| 484 |
GFC_FLAG_INLINE_INTRINSIC_NONE_UNSET |
| 485 |
= GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_NONE), |
| 486 |
GFC_FLAG_INLINE_INTRINSIC_MAXLOC_UNSET |
| 487 |
= GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_MAXLOC), |
| 488 |
GFC_FLAG_INLINE_INTRINSIC_MINLOC_UNSET |
| 489 |
= GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_MINLOC), |
| 490 |
GFC_FLAG_INLINE_INTRINSIC_ALL_UNSET |
| 491 |
= GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_ALL) |
| 492 |
}; |
| 493 |
|
| 494 |
#undef GFC_INL_INTR_UNSET_VAL |
| 495 |
#undef GFC_INL_INTR_VAL |
| 496 |
|
| 497 |
|
| 498 |
/* Inline String Operations functions. */ |
| 499 |
enum ilsop_fn |
| 500 |
{ |
| 501 |
ILSOP_NONE = 0, |
| 502 |
ILSOP_MEMSET = 1 << 0, |
| 503 |
ILSOP_MEMCPY = 1 << 1, |
| 504 |
ILSOP_MEMMOVE = 1 << 2, |
| 505 |
ILSOP_MEMCMP = 1 << 3, |
| 506 |
ILSOP_ALL = -1 |
| 507 |
}; |
| 508 |
|
| 509 |
/* Control-Flow Protection values. */ |
| 510 |
enum cf_protection_level |
| 511 |
{ |
| 512 |
CF_NONE = 0, |
| 513 |
CF_BRANCH = 1 << 0, |
| 514 |
CF_RETURN = 1 << 1, |
| 515 |
CF_FULL = CF_BRANCH | CF_RETURN, |
| 516 |
CF_SET = 1 << 2, |
| 517 |
CF_CHECK = 1 << 3 |
| 518 |
}; |
| 519 |
|
| 520 |
/* Parloops schedule type. */ |
| 521 |
enum parloops_schedule_type |
| 522 |
{ |
| 523 |
PARLOOPS_SCHEDULE_STATIC = 0, |
| 524 |
PARLOOPS_SCHEDULE_DYNAMIC, |
| 525 |
PARLOOPS_SCHEDULE_GUIDED, |
| 526 |
PARLOOPS_SCHEDULE_AUTO, |
| 527 |
PARLOOPS_SCHEDULE_RUNTIME |
| 528 |
}; |
| 529 |
|
| 530 |
/* Ranger debug mode. */ |
| 531 |
enum ranger_debug |
| 532 |
{ |
| 533 |
RANGER_DEBUG_NONE = 0, |
| 534 |
RANGER_DEBUG_TRACE = 1, |
| 535 |
RANGER_DEBUG_CACHE = 2, |
| 536 |
RANGER_DEBUG_GORI = 4, |
| 537 |
RANGER_DEBUG_TRACE_GORI = (RANGER_DEBUG_TRACE | RANGER_DEBUG_GORI), |
| 538 |
RANGER_DEBUG_TRACE_CACHE = (RANGER_DEBUG_TRACE | RANGER_DEBUG_CACHE), |
| 539 |
RANGER_DEBUG_ALL = (RANGER_DEBUG_GORI | RANGER_DEBUG_CACHE |
| 540 |
| RANGER_DEBUG_TRACE) |
| 541 |
}; |
| 542 |
|
| 543 |
/* Jump threader verbose dumps. */ |
| 544 |
enum threader_debug |
| 545 |
{ |
| 546 |
THREADER_DEBUG_NONE = 0, |
| 547 |
THREADER_DEBUG_ALL = 1 |
| 548 |
}; |
| 549 |
|
| 550 |
/* Modes of OpenACC 'kernels' constructs handling. */ |
| 551 |
enum openacc_kernels |
| 552 |
{ |
| 553 |
OPENACC_KERNELS_DECOMPOSE, |
| 554 |
OPENACC_KERNELS_PARLOOPS |
| 555 |
}; |
| 556 |
|
| 557 |
/* Modes of OpenACC privatization diagnostics. */ |
| 558 |
enum openacc_privatization |
| 559 |
{ |
| 560 |
OPENACC_PRIVATIZATION_QUIET, |
| 561 |
OPENACC_PRIVATIZATION_NOISY |
| 562 |
}; |
| 563 |
|
| 564 |
/* Targets for -fopenmp-target-simd-clone. */ |
| 565 |
enum omp_target_simd_clone_device_kind |
| 566 |
{ |
| 567 |
OMP_TARGET_SIMD_CLONE_NONE = 0, |
| 568 |
OMP_TARGET_SIMD_CLONE_HOST = 1, |
| 569 |
OMP_TARGET_SIMD_CLONE_NOHOST = 2, |
| 570 |
OMP_TARGET_SIMD_CLONE_ANY = 3 |
| 571 |
}; |
| 572 |
|
| 573 |
#endif |
| 574 |
|
| 575 |
#endif /* ! GCC_FLAG_TYPES_H */ |