common.opt 72.3 KB
Newer Older
1
; Options for the language- and target-independent parts of the compiler.
2

3
; Copyright (C) 2003-2013 Free Software Foundation, Inc.
4 5 6 7 8
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
9
; Software Foundation; either version 3, or (at your option) any later
10
; version.
Mike Stump committed
11
;
12 13 14 15
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
; for more details.
Mike Stump committed
16
;
17
; You should have received a copy of the GNU General Public License
18 19
; along with GCC; see the file COPYING3.  If not see
; <http://www.gnu.org/licenses/>.
20

21
; See the GCC internals manual (options.texi) for a description of this file's format.
22 23 24

; Please try to keep this file in ASCII collating order.

25 26 27
Variable
int target_flags

28 29 30 31 32 33
Variable
int optimize

Variable
int optimize_size

34 35 36
Variable
int optimize_debug

37 38 39 40 41
; Not used directly to control optimizations, only to save -Ofast
; setting for "optimize" attributes.
Variable
int optimize_fast

42 43 44 45 46 47 48
; True if this is the lto front end.  This is used to disable gimple
; generation and lowering passes that are normally run on the output
; of a front end.  These passes must be bypassed for lto since they
; have already been done before the gimple was written.
Variable
bool in_lto_p = false

49 50 51 52 53 54 55 56 57 58 59 60 61 62
; 0 means straightforward implementation of complex divide acceptable.
; 1 means wide ranges of inputs must work for complex divide.
; 2 means C99-like requirements for complex multiply and divide.
Variable
int flag_complex_method = 1

; Nonzero if subexpressions must be evaluated from left-to-right.
Variable
int flag_evaluation_order = 0

; Language specific warning pass for unused results.
Variable
bool flag_warn_unused_result = false

63 64 65
Variable
int *param_values

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
; Nonzero if we should write GIMPLE bytecode for link-time optimization.
Variable
int flag_generate_lto

; True to warn about any objects definitions whose size is larger
; than N bytes.  Also want about function definitions whose returned
; values are larger than N bytes, where N is 'larger_than_size'.
Variable
bool warn_larger_than

Variable
HOST_WIDE_INT larger_than_size

; True to warn about any function whose frame size is larger
; than N bytes.
Variable
bool warn_frame_larger_than

Variable
HOST_WIDE_INT frame_larger_than_size

; Nonzero means we should be saving declaration info into a .X file.
Variable
int flag_gen_aux_info = 0

; Nonzero if we are compiling code for a shared library, zero for
; executable.
Variable
int flag_shlib

96 97 98 99 100 101 102 103
; These two are really VEC(char_p,heap) *.

Variable
void *flag_instrument_functions_exclude_functions

Variable
void *flag_instrument_functions_exclude_files

104 105 106 107 108 109 110 111 112 113 114 115 116
; Generic structs (e.g. templates not explicitly specialized)
; may not have a compilation unit associated with them, and so
; may need to be treated differently from ordinary structs.
;
; Structs only handled by reference (indirectly), will also usually
; not need as much debugging information.

Variable
enum debug_struct_file debug_struct_ordinary[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }

Variable
enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS] = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY }

117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
; True if we should exit after parsing options.
Variable
bool exit_after_options

; Type(s) of debugging information we are producing (if any).  See
; flag-types.h for the definitions of the different possible types of
; debugging information.
Variable
enum debug_info_type write_symbols = NO_DEBUG

; Level of debugging information we are producing.  See flag-types.h
; for the definitions of the different possible levels.
Variable
enum debug_info_levels debug_info_level = DINFO_LEVEL_NONE

; Nonzero means use GNU-only extensions in the generated symbolic
; debugging information.  Currently, this only has an effect when
; write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG.
Variable
bool use_gnu_debug_info_extensions

138 139 140 141 142
; Original value of maximum field alignment in bytes, specified via
; -fpack-struct=<value>.
Variable
unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT

143 144 145 146
; Type of stack check.
Variable
enum stack_check_type flag_stack_check = NO_STACK_CHECK

147 148 149 150
; True if stack usage information needs to be computed.
Variable
bool flag_stack_usage_info = false

151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
; -dA causes debug commentary information to be produced in
; the generated assembly code (to make it more readable).  This option
; is generally only of use to those who actually need to read the
; generated assembly code (perhaps while debugging the compiler itself).
; Currently, this switch is only used by dwarf2out.c; however, it is intended
; to be a catchall for printing debug information in the assembler file.
Variable
int flag_debug_asm

; -dP causes the rtl to be emitted as a comment in assembly.
Variable
int flag_dump_rtl_in_asm

; Whether -da was passed (used only in handle_common_deferred_options).
Variable
bool flag_dump_all_passed

; Other flags saying which kinds of debugging dump have been requested.

Variable
int rtl_dump_and_exit

Variable
int flag_print_asm_name

176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
; Name of top-level original source file (what was input to cpp).
; This comes from the #-command at the beginning of the actual input.
; If there isn't any there, then this is the cc1 input file name.
Variable
const char *main_input_filename

; Pointer to base name in main_input_filename, with directories and a
; single final extension removed, and the length of this base
; name.

Variable
const char *main_input_basename

Variable
int main_input_baselength

192 193 194 195
; Which options have been printed by --help.
Variable
char *help_printed

196 197 198 199 200 201
; Which enums have been printed by --help.  0 = not printed, no
; relevant options seen, 1 = relevant option seen, not yet printed, 2
; = printed.
Variable
char *help_enum_printed

202 203 204 205 206 207 208 209
; The number of columns for --help output.
Variable
unsigned int help_columns

; Whether this options structure has been through finish_options
Variable
bool flag_opts_finished

Marek Polacek committed
210 211 212 213
; What the sanitizer should instrument
Variable
unsigned int flag_sanitize

214 215 216
###
Driver

217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
-assemble
Driver Alias(S)

-compile
Driver Alias(c)

-coverage
Driver Alias(coverage)

-debug
Common Alias(g)

-dump
Common Separate Alias(d)

-dump=
Common Joined Alias(d)

-dumpbase
Common Separate Alias(dumpbase)

-dumpdir
Common Separate Alias(dumpdir)

-entry
Driver Separate Alias(e)

-entry=
Driver Joined Alias(e)

-extra-warnings
Common Warning Alias(Wextra)

-for-assembler
Driver Separate Alias(Xassembler)

-for-assembler=
Driver JoinedOrMissing Alias(Xassembler)

-for-linker
Driver Separate Alias(Xlinker)

-for-linker=
Driver JoinedOrMissing Alias(Xlinker)

-force-link
Driver Separate Alias(u)

-force-link=
Driver Joined Alias(u)

268
-help
269
Common Driver Var(help_flag)
Neil Booth committed
270
Display this information
271

272
-help=
273
Common Driver Report Joined
274
--help=<class>	Display descriptions of a specific class of options.  <class> is one or more of optimizers, target, warnings, undocumented, params
Neil Booth committed
275

276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
-language
Driver Separate Alias(x)

-language=
Driver Joined Alias(x)

-library-directory
Driver Separate Alias(L)

-library-directory=
Driver Joined Alias(L)

-no-canonical-prefixes
Driver Alias(no-canonical-prefixes)

-no-standard-libraries
Driver Alias(nostdlib)

294 295 296
-no-sysroot-suffix
Driver Var(no_sysroot_suffix)

297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
-no-warnings
Common Alias(w)

-optimize
Common Alias(O)

-output
Common Driver Separate Alias(o) MissingArgError(missing filename after %qs)

-output=
Common Driver Joined Alias(o) MissingArgError(missing filename after %qs)

-pass-exit-codes
Driver Alias(pass-exit-codes)

-pedantic
313
Common Alias(Wpedantic)
314 315 316 317 318

-pedantic-errors
Common Alias(pedantic-errors)

-pie
319
Driver Alias(pie)
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350

-pipe
Driver Alias(pipe)

-prefix
Driver Separate Alias(B)

-prefix=
Driver JoinedOrMissing Alias(B)

-preprocess
Driver Alias(E)

-print-file-name
Driver Separate Alias(print-file-name=)

-print-file-name=
Driver JoinedOrMissing Alias(print-file-name=)

-print-libgcc-file-name
Driver Alias(print-libgcc-file-name)

-print-multi-directory
Driver Alias(print-multi-directory)

-print-multi-lib
Driver Alias(print-multi-lib)

-print-multi-os-directory
Driver Alias(print-multi-os-directory)

351 352 353
-print-multiarch
Driver Alias(print-multiarch)

354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
-print-prog-name
Driver Separate Alias(print-prog-name=)

-print-prog-name=
Driver JoinedOrMissing Alias(print-prog-name=)

-print-search-dirs
Driver Alias(print-search-dirs)

-print-sysroot
Driver Alias(print-sysroot)

-print-sysroot-headers-suffix
Driver Alias(print-sysroot-headers-suffix)

-profile
Common Alias(p)

-save-temps
Driver Alias(save-temps)

-shared
376
Driver Alias(shared)
377 378 379 380 381 382 383 384 385 386 387 388 389

-specs
Driver Separate Alias(specs=)

-specs=
Driver Joined Alias(specs=)

-static
Driver Alias(static)

-symbolic
Driver Alias(symbolic)

390
-target-help
391
Common Driver
392 393
Alias for --help=target

394 395 396 397 398 399 400 401 402
-time
Driver Alias(time)

-verbose
Driver Alias(v)

;; The driver used to convert options such as --help into forms such
;; as -fhelp; the following four entries are for compatibility with
;; any direct uses of those (undocumented) -f forms
403
fhelp
404
Common Driver Alias(-help)
405 406

fhelp=
407
Common Driver Joined Alias(-help=)
408 409

ftarget-help
410
Common Driver Alias(-target-help)
411

412
fversion
413
Common Driver Alias(-version)
414

415 416 417
-param
Common Separate
--param <param>=<value>	Set parameter <param> to value.  See below for a complete list of parameters
418

419 420 421 422 423 424
-param=
Common Joined Alias(-param)

-sysroot
Driver Separate Alias(-sysroot=)

425 426 427
-sysroot=
Driver JoinedOrMissing

428
-version
429 430 431 432 433 434 435
Common Driver

B
Driver Joined Separate

E
Driver
436

437 438 439
L
Driver Joined Separate

440 441 442
N
Driver

Neil Booth committed
443
O
444
Common JoinedOrMissing Optimization
Neil Booth committed
445
-O<number>	Set optimization level to <number>
Neil Booth committed
446 447

Os
448
Common Optimization
Neil Booth committed
449
Optimize for space rather than speed
Neil Booth committed
450

451 452 453 454
Ofast
Common Optimization
Optimize for speed disregarding exact standards compliance

455 456 457 458
Og
Common Optimization
Optimize for debugging experience rather than speed or size

459 460 461 462 463 464 465 466 467
Q
Driver

Qn
Driver Negative(Qy)

Qy
Driver Negative(Qn)

468 469 470
R
Driver Joined Separate

471 472 473
S
Driver

474 475 476 477 478 479
T
Driver Joined Separate

Tbss
Driver Separate

480 481 482
Tbss=
Driver Joined

483 484 485
Tdata
Driver Separate

486 487 488
Tdata=
Driver Joined

489 490 491
Ttext
Driver Separate

492 493 494
Ttext=
Driver Joined

Neil Booth committed
495
W
496
Common RejectNegative Warning Alias(Wextra)
497
This switch is deprecated; use -Wextra instead
Neil Booth committed
498

499 500 501 502 503 504 505 506 507
Wa,
Driver JoinedOrMissing

Wl,
Driver JoinedOrMissing

Wp,
Driver JoinedOrMissing

508
Waggregate-return
509
Common Var(warn_aggregate_return) Warning
510
Warn about returning structures, unions or arrays
511

512 513 514 515
Waggressive-loop-optimizations
Common Var(warn_aggressive_loop_optimizations) Init(1) Warning
Warn if a loop with constant number of iterations triggers undefined behavior

516
Warray-bounds
517
Common Var(warn_array_bounds) Warning
518 519
Warn if an array is accessed out of bounds

520
Wattributes
521
Common Var(warn_attributes) Init(1) Warning
522 523
Warn about inappropriate attribute usage

524
Wcast-align
525
Common Var(warn_cast_align) Warning
526
Warn about pointer casts which increase alignment
527

528 529 530 531
Wcpp
Common Var(warn_cpp) Init(1) Warning
Warn when a #warning directive is encountered

532
Wdeprecated-declarations
533
Common Var(warn_deprecated_decl) Init(1) Warning
534
Warn about uses of __attribute__((deprecated)) declarations
535 536

Wdisabled-optimization
537
Common Var(warn_disabled_optimization) Warning
538
Warn when an optimization pass is disabled
539 540

Werror
541
Common Var(warnings_are_errors)
542
Treat all warnings as errors
543

544 545 546 547
Werror=
Common Joined
Treat specified warning as error

Neil Booth committed
548
Wextra
549
Common Var(extra_warnings) Warning
Neil Booth committed
550
Print extra (possibly unwanted) warnings
Neil Booth committed
551

552
Wfatal-errors
553
Common Var(flag_fatal_errors)
554 555
Exit on the first error occurred

556 557
Wframe-larger-than=
Common RejectNegative Joined UInteger
558
-Wframe-larger-than=<number>	Warn if a function's stack frame requires more than <number> bytes
559

560 561 562 563
Wfree-nonheap-object
Common Var(warn_free_nonheap_object) Init(1) Warning
Warn when attempting to free a non-heap object

564
Winline
565
Common Var(warn_inline) Warning
566
Warn when an inlined function cannot be inlined
567

568 569 570 571
Winvalid-memory-model
Common Var(warn_invalid_memory_model) Init(1) Warning
Warn when an atomic memory model parameter is known to be outside the valid range.

572
Wlarger-than-
573
Common RejectNegative Joined Warning Undocumented Alias(Wlarger-than=)
574 575 576 577

Wlarger-than=
Common RejectNegative Joined UInteger Warning
-Wlarger-than=<number>	Warn if an object is larger than <number> bytes
578

579
Wunsafe-loop-optimizations
580
Common Var(warn_unsafe_loop_optimizations) Warning
581 582
Warn if the loop cannot be optimized due to nontrivial assumptions.

583
Wmissing-noreturn
584
Common Alias(Wsuggest-attribute=noreturn)
585

586
Woverflow
587
Common Var(warn_overflow) Init(1) Warning
588 589
Warn about overflow in arithmetic expressions

590
Wpacked
591
Common Var(warn_packed) Warning
592
Warn when the packed attribute has no effect on struct layout
593 594

Wpadded
595
Common Var(warn_padded) Warning
596
Warn when padding is required to align structure members
597

598 599 600 601
Wpedantic
Common Var(pedantic) Warning
Issue warnings needed for strict compliance to the standard

602
Wshadow
603
Common Var(warn_shadow) Warning
604
Warn when one local variable shadows another
605

606
Wstack-protector
607
Common Var(warn_stack_protect) Warning
608 609
Warn when not issuing stack smashing protection for some reason

610 611 612 613
Wstack-usage=
Common Joined RejectNegative UInteger Var(warn_stack_usage) Init(-1) Warning
Warn if stack usage might be larger than specified amount

614
Wstrict-aliasing
615
Common Warning
616
Warn about code which might break strict aliasing rules
617

618
Wstrict-aliasing=
619
Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Warning
620 621
Warn about code which might break strict aliasing rules

622
Wstrict-overflow
623
Common Warning
624 625 626
Warn about optimizations that assume that signed overflow is undefined

Wstrict-overflow=
627
Common Joined RejectNegative UInteger Var(warn_strict_overflow) Warning
628 629
Warn about optimizations that assume that signed overflow is undefined

630 631 632 633 634 635 636 637
Wsuggest-attribute=const
Common Var(warn_suggest_attribute_const) Warning
Warn about functions which might be candidates for __attribute__((const))

Wsuggest-attribute=pure
Common Var(warn_suggest_attribute_pure) Warning
Warn about functions which might be candidates for __attribute__((pure))

638 639 640 641
Wsuggest-attribute=noreturn
Common Var(warn_suggest_attribute_noreturn) Warning
Warn about functions which might be candidates for __attribute__((noreturn))

642
Wsystem-headers
643
Common Var(warn_system_headers) Warning
644
Do not suppress warnings from system headers
645

646 647 648 649
Wtrampolines
Common Var(warn_trampolines) Warning
Warn whenever a trampoline is generated

650
Wtype-limits
651
Common Var(warn_type_limits) Warning EnabledBy(Wextra)
652 653
Warn if a comparison is always true or always false due to the limited range of the data type

654
Wuninitialized
655
Common Var(warn_uninitialized) Warning EnabledBy(Wextra)
656
Warn about uninitialized automatic variables
657

658
Wmaybe-uninitialized
659
Common Var(warn_maybe_uninitialized) Warning EnabledBy(Wuninitialized)
660 661
Warn about maybe uninitialized automatic variables

662
Wunreachable-code
663
Common Ignore
664
Does nothing. Preserved for backward compatibility.
665

Neil Booth committed
666
Wunused
667
Common Var(warn_unused) Init(0) Warning
Neil Booth committed
668
Enable all -Wunused- warnings
Neil Booth committed
669

670
Wunused-but-set-parameter
671
Common Var(warn_unused_but_set_parameter) Warning EnabledBy(Wunused && Wextra)
672 673 674
Warn when a function parameter is only set, otherwise unused

Wunused-but-set-variable
675
Common Var(warn_unused_but_set_variable) Warning EnabledBy(Wunused)
676 677
Warn when a variable is only set, otherwise unused

678
Wunused-function
679
Common Var(warn_unused_function) Warning EnabledBy(Wunused)
680
Warn when a function is unused
681 682

Wunused-label
683
Common Var(warn_unused_label) Warning EnabledBy(Wunused)
684
Warn when a label is unused
685 686

Wunused-parameter
687
Common Var(warn_unused_parameter) Warning EnabledBy(Wunused && Wextra)
688
Warn when a function parameter is unused
689 690

Wunused-value
691
Common Var(warn_unused_value) Warning EnabledBy(Wunused)
692
Warn when an expression value is unused
693 694

Wunused-variable
695
Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
696
Warn when a variable is unused
697

698
Wcoverage-mismatch
699 700
Common Var(warn_coverage_mismatch) Init(1) Warning
Warn in case profiles in -fprofile-use do not match
701

702 703 704 705
Wvector-operation-performance
Common Var(warn_vector_operation_performance) Warning
Warn when a vector operation is compiled outside the SIMD

706 707 708 709 710 711 712 713 714
Xassembler
Driver Separate

Xlinker
Driver Separate

Xpreprocessor
Driver Separate

715 716 717
Z
Driver

718
aux-info
719
Common Separate Var(aux_info_file_name)
Neil Booth committed
720
-aux-info <file>	Emit declaration information into <file>
721 722

aux-info=
723
Common Joined Alias(aux-info)
724 725

auxbase
726
Common Separate RejectDriver Var(aux_base_name)
727 728

auxbase-strip
729 730
Common Separate RejectDriver

731 732 733
coverage
Driver

734 735
c
Driver
736 737 738

d
Common Joined
Neil Booth committed
739
-d<letters>	Enable dumps from specific passes of the compiler
740 741

dumpbase
742
Common Separate Var(dump_base_name)
Neil Booth committed
743
-dumpbase <file>	Set the file basename to be used for dumps
744

745
dumpdir
746
Common Separate Var(dump_dir_name)
747
-dumpdir <dir>	Set the directory name to be used for dumps
748

749 750 751 752 753 754 755 756 757
dumpmachine
Driver

dumpspecs
Driver

dumpversion
Driver

758 759 760
e
Driver Joined Separate

761 762 763 764 765 766 767
; This option has historically been passed down to the linker by an
; accident of a %{e*} spec, so ensure it continues to be passed down
; as a single option.  The supported option for this purpose is
; -rdynamic.  See PR 47390.
export-dynamic
Driver Undocumented

768 769 770 771 772 773 774 775 776
; The version of the C++ ABI in use.  The following values are allowed:
;
; 0: The version of the ABI believed most conformant with the C++ ABI
;    specification.  This ABI may change as bugs are discovered and fixed.
;    Therefore, 0 will not necessarily indicate the same ABI in different
;    versions of G++.
;
; 1: The version of the ABI first used in G++ 3.2.
;
777 778 779 780 781 782
; 2: The version of the ABI first used in G++ 3.4 (and current default).
;
; 3: The version of the ABI that fixes the missing underscore
;    in template non-type arguments of pointer type.
;
; 4: The version of the ABI that introduces unambiguous mangling of
783
;    vector types.  First selectable in G++ 4.5.
784
;
785
; 5: The version of the ABI that ignores attribute const/noreturn
786
;    in function pointer mangling, and corrects mangling of decltype and
787
;    function parameters used in other parameters and the return type.
788
;    First selectable in G++ 4.6.
789
;
790 791 792 793
; 6: The version of the ABI that doesn't promote scoped enums to int and
;    changes the mangling of template argument packs, const/static_cast,
;    prefix ++ and --, and a class scope function used as a template
;    argument.
794 795
;    First selectable in G++ 4.7.
;
796 797
; 7: The version of the ABI that treats nullptr_t as a builtin type and
;    corrects the mangling of lambdas in default argument scope.
798
;    First selectable in G++ 4.8.
799 800 801 802 803
;
; 8: The version of the ABI that corrects the substitution behavior of
;    function types with function-cv-qualifiers.
;    First selectable in G++ 4.9.
;
804 805
; Additional positive integers will be assigned as new versions of
; the ABI become the default version of the ABI.
806
fabi-version=
807
Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
808

809 810 811 812
faggressive-loop-optimizations
Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1) 
Aggressively optimize loops using language constraints

813
falign-functions
814
Common Report Var(align_functions,0) Optimization UInteger
815
Align the start of functions
816

Neil Booth committed
817
falign-functions=
818
Common RejectNegative Joined UInteger Var(align_functions)
Neil Booth committed
819

820
falign-jumps
821
Common Report Var(align_jumps,0) Optimization UInteger
822
Align labels which are only reached by jumping
823

Neil Booth committed
824
falign-jumps=
825
Common RejectNegative Joined UInteger Var(align_jumps)
Neil Booth committed
826

827
falign-labels
828
Common Report Var(align_labels,0) Optimization UInteger
829
Align all labels
830

Neil Booth committed
831
falign-labels=
832
Common RejectNegative Joined UInteger Var(align_labels)
Neil Booth committed
833

834
falign-loops
835
Common Report Var(align_loops,0) Optimization UInteger
836
Align the start of loops
837

Neil Booth committed
838
falign-loops=
839
Common RejectNegative Joined UInteger Var(align_loops)
Neil Booth committed
840

841
fargument-alias
842
Common Ignore
843
Does nothing. Preserved for backward compatibility.
844 845

fargument-noalias
846
Common Ignore
847
Does nothing. Preserved for backward compatibility.
848 849

fargument-noalias-global
850
Common Ignore
851
Does nothing. Preserved for backward compatibility.
852

853
fargument-noalias-anything
854
Common Ignore
855
Does nothing. Preserved for backward compatibility.
856

Marek Polacek committed
857 858 859
fsanitize=
Common Driver Report Joined
Select what to sanitize
860

861
fasynchronous-unwind-tables
862
Common Report Var(flag_asynchronous_unwind_tables) Optimization
863
Generate unwind tables that are exact at each instruction boundary
864

865 866 867 868
fauto-inc-dec
Common Report Var(flag_auto_inc_dec) Init(1)
Generate auto-inc/dec instructions

869 870 871 872
; -fcheck-bounds causes gcc to generate array bounds checks.
; For C, C++ and ObjC: defaults off.
; For Java: defaults to on.
; For Fortran: defaults to off.
873
fbounds-check
874
Common Report Var(flag_bounds_check)
875
Generate code to check bounds before indexing arrays
876 877

fbranch-count-reg
878
Common Report Var(flag_branch_on_count_reg) Init(1) Optimization
879
Replace add, compare, branch with branch on count register
880 881

fbranch-probabilities
882
Common Report Var(flag_branch_probabilities) Optimization
883
Use profiling information for branch probabilities
884

Neil Booth committed
885
fbranch-target-load-optimize
886
Common Report Var(flag_branch_target_load_optimize) Optimization
887
Perform branch target load optimization before prologue / epilogue threading
Neil Booth committed
888 889

fbranch-target-load-optimize2
890
Common Report Var(flag_branch_target_load_optimize2) Optimization
891
Perform branch target load optimization after prologue / epilogue threading
Neil Booth committed
892

893
fbtr-bb-exclusive
894
Common Report Var(flag_btr_bb_exclusive) Optimization
895 896
Restrict target load migration not to re-use registers in any basic block

Neil Booth committed
897
fcall-saved-
898
Common Joined RejectNegative Var(common_deferred_options) Defer
Neil Booth committed
899
-fcall-saved-<register>	Mark <register> as being preserved across functions
Neil Booth committed
900 901

fcall-used-
902
Common Joined RejectNegative Var(common_deferred_options) Defer
Neil Booth committed
903
-fcall-used-<register>	Mark <register> as being corrupted by function calls
Neil Booth committed
904

905 906 907
; Nonzero for -fcaller-saves: allocate values in regs that need to
; be saved across function calls, if that produces overall better code.
; Optional now, so people can test it.
Neil Booth committed
908
fcaller-saves
909
Common Report Var(flag_caller_saves) Optimization
910
Save registers around function calls
Neil Booth committed
911

912 913 914 915
fcheck-data-deps
Common Report Var(flag_check_data_deps)
Compare the results of several data dependence analyzers.

916 917 918 919
fcheck-new
Common Var(flag_check_new)
Check the return value of new in C++

920 921 922 923
fcombine-stack-adjustments
Common Report Var(flag_combine_stack_adjustments) Optimization
Looks for opportunities to reduce stack adjustments and stack references.

924
fcommon
925
Common Report Var(flag_no_common,0) Optimization
926
Do not put uninitialized globals in the common section
927

928 929 930 931
fcompare-debug
Driver
; Converted by the driver to -fcompare-debug= options.

932
fcompare-debug=
933
Common Driver JoinedOrMissing RejectNegative Var(flag_compare_debug_opt)
934
-fcompare-debug[=<opts>]	Compile with and without e.g. -gtoggle, and compare the final-insns dump
935 936

fcompare-debug-second
937
Common Driver RejectNegative Var(flag_compare_debug)
938 939
Run only the second compilation of -fcompare-debug

940 941 942 943
fcompare-elim
Common Report Var(flag_compare_elim_after_reload) Optimization
Perform comparison elimination after register allocation has finished

944 945 946 947
fconserve-stack
Common Var(flag_conserve_stack) Optimization
Do not perform optimizations increasing noticeably stack usage

948
fcprop-registers
949
Common Report Var(flag_cprop_registers) Optimization
950
Perform a register copy-propagation optimization pass
951

Neil Booth committed
952
fcrossjumping
953
Common Report Var(flag_crossjumping) Optimization
954
Perform cross-jumping optimization
Neil Booth committed
955 956

fcse-follow-jumps
957
Common Report Var(flag_cse_follow_jumps) Optimization
958
When running CSE, follow jumps to their targets
Neil Booth committed
959 960

fcse-skip-blocks
961
Common Ignore
962
Does nothing.  Preserved for backward compatibility.
Neil Booth committed
963

964
fcx-limited-range
965
Common Report Var(flag_cx_limited_range) Optimization SetByCombined
966 967
Omit range reduction step when performing complex division

968 969 970 971
fcx-fortran-rules
Common Report Var(flag_cx_fortran_rules) Optimization
Complex multiplication and division follow Fortran rules

972
fdata-sections
973
Common Report Var(flag_data_sections) Optimization
974
Place data items into their own section
975

976
fdbg-cnt-list
977
Common Report Var(common_deferred_options) Defer
978 979
List all available debugging counters with their limits and counts.

980
fdbg-cnt=
981
Common RejectNegative Joined Var(common_deferred_options) Defer
982
-fdbg-cnt=<counter>:<limit>[,<counter>:<limit>,...]	Set the debug counter limit.   
983

984
fdebug-prefix-map=
985
Common Joined RejectNegative Var(common_deferred_options) Defer
986 987
Map one directory name to another in debug information

988
fdebug-types-section
989
Common Report Var(flag_debug_types_section) Init(0)
990 991
Output .debug_types section when using DWARF v4 debuginfo.

992 993
; Nonzero for -fdefer-pop: don't pop args after each function call
; instead save them up to pop many calls' args with one insns.
Neil Booth committed
994
fdefer-pop
995
Common Report Var(flag_defer_pop) Optimization
996
Defer popping functions args from stack until later
Neil Booth committed
997 998

fdelayed-branch
999
Common Report Var(flag_delayed_branch) Optimization
1000
Attempt to fill delay slots of branch instructions
Neil Booth committed
1001

1002 1003 1004 1005
fdelete-dead-exceptions
Common Report Var(flag_delete_dead_exceptions) Init(0)
Delete dead instructions that may throw exceptions

Neil Booth committed
1006
fdelete-null-pointer-checks
1007
Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization
1008
Delete useless null pointer checks
Neil Booth committed
1009

1010 1011 1012 1013
fdevirtualize-speculatively
Common Report Var(flag_devirtualize_speculatively) Optimization
Perform speculative devirtualization

1014 1015 1016 1017
fdevirtualize
Common Report Var(flag_devirtualize) Optimization
Try to convert virtual calls to direct ones.

Neil Booth committed
1018
fdiagnostics-show-location=
1019
Common Joined RejectNegative Enum(diagnostic_prefixing_rule)
Neil Booth committed
1020
-fdiagnostics-show-location=[once|every-line]	How often to emit source location at the beginning of line-wrapped diagnostics
Neil Booth committed
1021

1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
; Required for these enum values.
SourceInclude
pretty-print.h

Enum
Name(diagnostic_prefixing_rule) Type(int)

EnumValue
Enum(diagnostic_prefixing_rule) String(once) Value(DIAGNOSTICS_SHOW_PREFIX_ONCE)

EnumValue
Enum(diagnostic_prefixing_rule) String(every-line) Value(DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE)

1035 1036 1037 1038
fdiagnostics-show-caret
Common Var(flag_diagnostics_show_caret) Init(1)
Show the source line with a caret indicating the column

1039 1040 1041 1042 1043
fdiagnostics-color
Common Alias(fdiagnostics-color=,always,never)
;

fdiagnostics-color=
1044
Common Joined RejectNegative Var(flag_diagnostics_show_color) Enum(diagnostic_color_rule) Init(DIAGNOSTICS_COLOR_NO)
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062
-fdiagnostics-color=[never|always|auto]	Colorize diagnostics

; Required for these enum values.
SourceInclude
diagnostic-color.h

Enum
Name(diagnostic_color_rule) Type(int)

EnumValue
Enum(diagnostic_color_rule) String(never) Value(DIAGNOSTICS_COLOR_NO)

EnumValue
Enum(diagnostic_color_rule) String(always) Value(DIAGNOSTICS_COLOR_YES)

EnumValue
Enum(diagnostic_color_rule) String(auto) Value(DIAGNOSTICS_COLOR_AUTO)

1063
fdiagnostics-show-option
1064
Common Var(flag_diagnostics_show_option) Init(1)
1065
Amend appropriate diagnostic messages with the command line option that controls them
1066

1067 1068 1069 1070 1071 1072 1073 1074
fdisable-
Common Joined RejectNegative Var(common_deferred_options) Defer
-fdisable-[tree|rtl|ipa]-<pass>=range1+range2 disables an optimization pass

fenable-
Common Joined RejectNegative Var(common_deferred_options) Defer
-fenable-[tree|rtl|ipa]-<pass>=range1+range2 enables an optimization pass

1075
fdump-
1076
Common Joined RejectNegative Var(common_deferred_options) Defer
1077 1078
-fdump-<type>	Dump various compiler internals to a file

1079 1080 1081
fdump-final-insns
Driver RejectNegative

1082 1083 1084 1085
fdump-final-insns=
Common RejectNegative Joined Var(flag_dump_final_insns)
-fdump-final-insns=filename	Dump to filename the insns at the end of translation

Ian Lance Taylor committed
1086 1087 1088 1089
fdump-go-spec=
Common RejectNegative Joined Var(flag_dump_go_spec)
-fdump-go-spec=filename	Write all declarations to file as Go code

1090 1091 1092 1093
fdump-noaddr
Common Report Var(flag_dump_noaddr)
Suppress output of addresses in debugging dumps

1094 1095 1096 1097
fdump-passes
Common Var(flag_dump_passes) Init(0)
Dump optimization passes

1098
fdump-unnumbered
1099
Common Report Var(flag_dump_unnumbered)
1100
Suppress output of instruction numbers, line number notes and addresses in debugging dumps
1101

1102
fdump-unnumbered-links
1103
Common Report Var(flag_dump_unnumbered_links)
1104 1105
Suppress output of previous and next insn numbers in debugging dumps

1106 1107 1108 1109
fdwarf2-cfi-asm
Common Report Var(flag_dwarf2_cfi_asm) Init(HAVE_GAS_CFI_DIRECTIVE)
Enable CFI tables via GAS assembler directives.

1110
fearly-inlining
1111
Common Report Var(flag_early_inlining) Init(1) Optimization
1112 1113
Perform early inlining

Neil Booth committed
1114
feliminate-dwarf2-dups
1115
Common Report Var(flag_eliminate_dwarf2_dups)
1116
Perform DWARF2 duplicate elimination
Neil Booth committed
1117

1118 1119 1120 1121
fipa-sra
Common Report Var(flag_ipa_sra) Init(0) Optimization
Perform interprocedural reduction of aggregates

1122
feliminate-unused-debug-symbols
1123
Common Report Var(flag_debug_only_used_symbols)
1124
Perform unused type elimination in debug info
1125

Neil Booth committed
1126
feliminate-unused-debug-types
1127
Common Report Var(flag_eliminate_unused_debug_types) Init(1)
1128
Perform unused type elimination in debug info
Neil Booth committed
1129

1130
femit-class-debug-always
1131
Common Report Var(flag_emit_class_debug_always) Init(0)
1132 1133
Do not suppress C++ class debug information.

1134
fexceptions
1135
Common Report Var(flag_exceptions) Optimization
1136
Enable exception handling
1137

Neil Booth committed
1138
fexpensive-optimizations
1139
Common Report Var(flag_expensive_optimizations) Optimization
1140
Perform a number of minor, expensive optimizations
Neil Booth committed
1141

1142
fexcess-precision=
1143
Common Joined RejectNegative Enum(excess_precision) Var(flag_excess_precision_cmdline) Init(EXCESS_PRECISION_DEFAULT)
1144 1145
-fexcess-precision=[fast|standard]	Specify handling of excess floating-point precision

1146 1147 1148 1149 1150 1151 1152 1153 1154
Enum
Name(excess_precision) Type(enum excess_precision) UnknownError(unknown excess precision style %qs)

EnumValue
Enum(excess_precision) String(fast) Value(EXCESS_PRECISION_FAST)

EnumValue
Enum(excess_precision) String(standard) Value(EXCESS_PRECISION_STANDARD)

Neil Booth committed
1155 1156 1157
ffast-math
Common

1158 1159 1160 1161
ffat-lto-objects
Common Var(flag_fat_lto_objects) Init(1)
Output lto objects containing both the intermediate language and binary output.

1162
ffinite-math-only
1163
Common Report Var(flag_finite_math_only) Optimization SetByCombined
1164
Assume no NaNs or infinities are generated
1165

Neil Booth committed
1166
ffixed-
1167
Common Joined RejectNegative Var(common_deferred_options) Defer
Neil Booth committed
1168
-ffixed-<register>	Mark <register> as being unavailable to the compiler
Neil Booth committed
1169

Neil Booth committed
1170
ffloat-store
1171
Common Report Var(flag_float_store) Optimization
1172
Don't allocate floats and doubles in extended-precision registers
Neil Booth committed
1173 1174

fforce-addr
1175
Common Ignore
1176
Does nothing.  Preserved for backward compatibility.
Neil Booth committed
1177

1178 1179
fforward-propagate
Common Report Var(flag_forward_propagate) Optimization
Paolo Bonzini committed
1180 1181
Perform a forward propagation pass on RTL

1182
ffp-contract=
1183
Common Joined RejectNegative Enum(fp_contract_mode) Var(flag_fp_contract_mode) Init(FP_CONTRACT_FAST)
1184 1185
-ffp-contract=[off|on|fast] Perform floating-point expression contraction.

1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198
Enum
Name(fp_contract_mode) Type(enum fp_contract_mode) UnknownError(unknown floating point contraction style %qs)

EnumValue
Enum(fp_contract_mode) String(off) Value(FP_CONTRACT_OFF)

; Not implemented, fall back to conservative FP_CONTRACT_OFF.
EnumValue
Enum(fp_contract_mode) String(on) Value(FP_CONTRACT_OFF)

EnumValue
Enum(fp_contract_mode) String(fast) Value(FP_CONTRACT_FAST)

1199 1200 1201
; Nonzero means don't put addresses of constant functions in registers.
; Used for compiling the Unix kernel, where strange substitutions are
; done on the assembly output.
Neil Booth committed
1202
ffunction-cse
1203
Common Report Var(flag_no_function_cse,0)
1204
Allow function addresses to be held in registers
Neil Booth committed
1205

1206
ffunction-sections
1207
Common Report Var(flag_function_sections)
1208
Place each function into its own section
1209

Neil Booth committed
1210
fgcse
1211
Common Report Var(flag_gcse) Optimization
1212
Perform global common subexpression elimination
Neil Booth committed
1213 1214

fgcse-lm
1215
Common Report Var(flag_gcse_lm) Init(1) Optimization
1216
Perform enhanced load motion during global common subexpression elimination
Neil Booth committed
1217 1218

fgcse-sm
1219
Common Report Var(flag_gcse_sm) Init(0) Optimization
1220
Perform store motion after global common subexpression elimination
Neil Booth committed
1221

1222
fgcse-las
1223
Common Report Var(flag_gcse_las) Init(0) Optimization
1224 1225 1226 1227
Perform redundant load after store elimination in global common subexpression
elimination

fgcse-after-reload
1228
Common Report Var(flag_gcse_after_reload) Optimization
1229
Perform global common subexpression elimination after register allocation
1230
has finished
1231

1232
; This option is not documented yet as its semantics will change.
1233 1234 1235 1236
fgraphite
Common Report Var(flag_graphite)
Enable in and out of Graphite representation

1237 1238 1239 1240
fgraphite-identity
Common Report Var(flag_graphite_identity) Optimization
Enable Graphite Identity transformation

1241 1242 1243 1244 1245
fhoist-adjacent-loads
Common Report Var(flag_hoist_adjacent_loads) Optimization
Enable hoisting adjacent loads to encourage generating conditional move
instructions

1246 1247
floop-parallelize-all
Common Report Var(flag_loop_parallelize_all) Optimization
1248 1249
Mark all loops as parallel

1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261
floop-strip-mine
Common Report Var(flag_loop_strip_mine) Optimization
Enable Loop Strip Mining transformation

floop-interchange
Common Report Var(flag_loop_interchange) Optimization
Enable Loop Interchange transformation

floop-block
Common Report Var(flag_loop_block) Optimization
Enable Loop Blocking transformation

1262 1263 1264 1265
fgnu-tm
Common Report Var(flag_tm)
Enable support for GNU transactional memory

1266
floop-flatten
1267 1268
Common Ignore
Does nothing. Preserved for backward compatibility.
1269

1270 1271 1272 1273
floop-nest-optimize
Common Report Var(flag_loop_optimize_isl) Optimization
Enable the ISL based loop nest optimizer

1274 1275 1276 1277
fstrict-volatile-bitfields
Common Report Var(flag_strict_volatile_bitfields) Init(-1)
Force bitfield accesses to match their type width

1278
fguess-branch-probability
1279
Common Report Var(flag_guess_branch_prob) Optimization
1280
Enable guessing of branch probabilities
1281

1282 1283 1284 1285
; Nonzero means ignore `#ident' directives.  0 means handle them.
; Generate position-independent code for executables if possible
; On SVR4 targets, it also controls whether or not to emit a
; string identifying the compiler.
1286
fident
1287
Common Report Var(flag_no_ident,0)
1288
Process #ident directives
1289

Neil Booth committed
1290
fif-conversion
1291
Common Report Var(flag_if_conversion) Optimization
1292
Perform conversion of conditional jumps to branchless equivalents
Neil Booth committed
1293 1294

fif-conversion2
1295
Common Report Var(flag_if_conversion2) Optimization
1296
Perform conversion of conditional jumps to conditional execution
Neil Booth committed
1297

1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
fstack-reuse=
Common Joined RejectNegative Enum(stack_reuse_level) Var(flag_stack_reuse) Init(SR_ALL)
-fstack-reuse=[all|named_vars|none] Set stack reuse level for local variables.

Enum
Name(stack_reuse_level) Type(enum stack_reuse_level) UnknownError(unknown Stack Reuse Level %qs)

EnumValue
Enum(stack_reuse_level) String(all) Value(SR_ALL)

EnumValue
Enum(stack_reuse_level) String(named_vars) Value(SR_NAMED_VARS)

EnumValue
Enum(stack_reuse_level) String(none) Value(SR_NONE)

1314 1315 1316 1317
ftree-loop-if-convert
Common Report Var(flag_tree_loop_if_convert) Init(-1) Optimization
Convert conditional jumps in innermost loops to branchless equivalents

1318 1319 1320 1321
ftree-loop-if-convert-stores
Common Report Var(flag_tree_loop_if_convert_stores) Optimization
Also if-convert conditional jumps containing memory writes

1322 1323 1324 1325
; -finhibit-size-directive inhibits output of .size for ELF.
; This is used only for compiling crtstuff.c,
; and it may be extended to other effects
; needed for crtstuff.c on other systems.
1326
finhibit-size-directive
1327
Common Report Var(flag_inhibit_size_directive)
1328
Do not generate .size directives
1329

1330 1331 1332 1333
findirect-inlining
Common Report Var(flag_indirect_inlining)
Perform indirect inlining

1334 1335
; General flag to enable inlining.  Specifying -fno-inline will disable
; all inlining apart from always-inline functions.
Neil Booth committed
1336
finline
1337
Common Report Var(flag_no_inline,0) Init(0) Optimization
1338
Enable inlining of function declared \"inline\", disabling disables all inlining
Neil Booth committed
1339

1340 1341
finline-small-functions
Common Report Var(flag_inline_small_functions) Optimization
1342
Integrate functions into their callers when code size is known not to grow
1343

Neil Booth committed
1344
finline-functions
1345
Common Report Var(flag_inline_functions) Optimization
1346
Integrate functions not declared \"inline\" into their callers when profitable
Neil Booth committed
1347

1348
finline-functions-called-once
1349
Common Report Var(flag_inline_functions_called_once) Optimization
1350
Integrate functions only required by their single caller
1351

1352
finline-limit-
1353
Common RejectNegative Joined Alias(finline-limit=)
1354 1355 1356

finline-limit=
Common RejectNegative Joined UInteger
Neil Booth committed
1357
-finline-limit=<number>	Limit the size of inlined functions to <number>
1358

1359 1360 1361 1362
finline-atomics
Common Report Var(flag_inline_atomics) Init(1) Optimization
Inline __atomic operations when a lock free instruction sequence is available.

1363
finstrument-functions
1364
Common Report Var(flag_instrument_function_entry_exit)
1365
Instrument function entry and exit with profiling calls
1366

1367 1368 1369 1370 1371 1372 1373 1374
finstrument-functions-exclude-function-list=
Common RejectNegative Joined
-finstrument-functions-exclude-function-list=name,...  Do not instrument listed functions

finstrument-functions-exclude-file-list=
Common RejectNegative Joined
-finstrument-functions-exclude-file-list=filename,...  Do not instrument functions listed in files

1375
fipa-cp
1376
Common Report Var(flag_ipa_cp) Optimization
1377
Perform interprocedural constant propagation
1378

1379 1380 1381 1382
fipa-cp-clone
Common Report Var(flag_ipa_cp_clone) Optimization
Perform cloning to make Interprocedural constant propagation stronger

1383 1384 1385
fipa-profile
Common Report Var(flag_ipa_profile) Init(0) Optimization
Perform interprocedural profile propagation
1386

1387
fipa-pta
1388
Common Report Var(flag_ipa_pta) Init(0) Optimization
1389 1390
Perform interprocedural points-to analysis

1391 1392 1393 1394
fipa-pure-const
Common Report Var(flag_ipa_pure_const) Init(0) Optimization
Discover pure and const functions

1395
fipa-reference
1396
Common Report Var(flag_ipa_reference) Init(0) Optimization
1397 1398
Discover readonly and non addressable static variables

1399
fipa-matrix-reorg
1400 1401
Common Ignore
Does nothing. Preserved for backward compatibility.
1402

1403
fipa-struct-reorg
1404 1405
Common Ignore
Does nothing. Preserved for backward compatibility.
1406

Vladimir Makarov committed
1407
fira-algorithm=
1408
Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB)
1409 1410
-fira-algorithm=[CB|priority] Set the used IRA algorithm

1411 1412 1413 1414 1415 1416 1417 1418 1419
Enum
Name(ira_algorithm) Type(enum ira_algorithm) UnknownError(unknown IRA algorithm %qs)

EnumValue
Enum(ira_algorithm) String(CB) Value(IRA_ALGORITHM_CB)

EnumValue
Enum(ira_algorithm) String(priority) Value(IRA_ALGORITHM_PRIORITY)

1420
fira-region=
1421
Common Joined RejectNegative Enum(ira_region) Var(flag_ira_region) Init(IRA_REGION_AUTODETECT)
1422
-fira-region=[one|all|mixed] Set regions for IRA
Vladimir Makarov committed
1423

1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435
Enum
Name(ira_region) Type(enum ira_region) UnknownError(unknown IRA region %qs)

EnumValue
Enum(ira_region) String(one) Value(IRA_REGION_ONE)

EnumValue
Enum(ira_region) String(all) Value(IRA_REGION_ALL)

EnumValue
Enum(ira_region) String(mixed) Value(IRA_REGION_MIXED)

1436 1437 1438 1439 1440
fira-hoist-pressure
Common Report Var(flag_ira_hoist_pressure) Init(1) Optimization
Use IRA based register pressure calculation
in RTL hoist optimizations.

1441 1442 1443 1444 1445
fira-loop-pressure
Common Report Var(flag_ira_loop_pressure)
Use IRA based register pressure calculation
in RTL loop optimizations.

Vladimir Makarov committed
1446 1447 1448 1449 1450 1451 1452 1453 1454
fira-share-save-slots
Common Report Var(flag_ira_share_save_slots) Init(1)
Share slots for saving different hard registers.

fira-share-spill-slots
Common Report Var(flag_ira_share_spill_slots) Init(1)
Share stack slots for spilled pseudo-registers.

fira-verbose=
1455
Common RejectNegative Joined UInteger Var(flag_ira_verbose) Init(5)
1456
-fira-verbose=<number>	Control IRA's level of diagnostic messages.
Vladimir Makarov committed
1457

1458
fivopts
1459
Common Report Var(flag_ivopts) Init(1) Optimization
1460 1461
Optimize induction variables on trees

1462
fjump-tables
1463
Common Var(flag_jump_tables) Init(1) Optimization
1464 1465
Use jump tables for sufficiently large switch statements

Neil Booth committed
1466
fkeep-inline-functions
1467
Common Report Var(flag_keep_inline_functions)
1468
Generate code for functions even if they are fully inlined
Neil Booth committed
1469 1470

fkeep-static-consts
1471
Common Report Var(flag_keep_static_consts) Init(1)
1472
Emit static const variables even if they are not used
Neil Booth committed
1473

1474
fleading-underscore
1475
Common Report Var(flag_leading_underscore) Init(-1)
1476
Give external symbols a leading underscore
1477

1478
floop-optimize
1479
Common Ignore
1480
Does nothing.  Preserved for backward compatibility.
1481

1482
flto
1483
Common
1484 1485
Enable link-time optimization.

1486 1487 1488 1489
flto=
Common RejectNegative Joined Var(flag_lto)
Link-time optimization with number of parallel jobs or jobserver.

1490 1491
flto-partition=1to1
Common Var(flag_lto_partition_1to1)
1492
Partition symbols and vars at linktime based on object files they originate from
1493 1494 1495 1496 1497

flto-partition=balanced
Common Var(flag_lto_partition_balanced)
Partition functions and vars at linktime into approximately same sized buckets

1498 1499 1500 1501
flto-partition=max
Common Var(flag_lto_partition_max)
Put every symbol into separate partition

1502 1503 1504 1505
flto-partition=none
Common Var(flag_lto_partition_none)
Disable partioning and streaming

1506 1507
; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h.
flto-compression-level=
1508
Common Joined RejectNegative UInteger Var(flag_lto_compression_level) Init(-1)
1509
-flto-compression-level=<number>	Use zlib compression level <number> for IL
1510 1511

flto-report
1512
Common Report Var(flag_lto_report) Init(0)
1513 1514
Report various link-time optimization statistics

Andi Kleen committed
1515 1516 1517 1518
flto-report-wpa
Common Report Var(flag_lto_report_wpa) Init(0)
Report various link-time optimization statistics for WPA only

1519
fmath-errno
1520
Common Report Var(flag_errno_math) Init(1) Optimization SetByCombined
1521
Set errno after built-in math functions
1522

1523 1524 1525 1526
fmax-errors=
Common Joined RejectNegative UInteger Var(flag_max_errors)
-fmax-errors=<number>	Maximum number of errors to report

1527
fmem-report
1528
Common Report Var(mem_report)
1529
Report on permanent memory allocation
1530

Andi Kleen committed
1531 1532 1533 1534
fmem-report-wpa
Common Report Var(mem_report_wpa)
Report on permanent memory allocation in WPA only

1535 1536 1537
; This will attempt to merge constant section constants, if 1 only
; string constants and constants from constant pool, if 2 also constant
; variables.
1538
fmerge-all-constants
1539
Common Report Var(flag_merge_constants,2) Init(1) Optimization
1540
Attempt to merge identical constants and constant variables
1541 1542

fmerge-constants
1543
Common Report Var(flag_merge_constants,1) Optimization
1544
Attempt to merge identical constants across compilation units
1545

1546 1547 1548 1549
fmerge-debug-strings
Common Report Var(flag_merge_debug_strings) Init(1)
Attempt to merge identical debug strings across compilation units

Neil Booth committed
1550 1551
fmessage-length=
Common RejectNegative Joined UInteger
Neil Booth committed
1552
-fmessage-length=<number>	Limit diagnostics to <number> characters per line.  0 suppresses line-wrapping
Neil Booth committed
1553

Ayal Zaks committed
1554
fmodulo-sched
1555
Common Report Var(flag_modulo_sched) Optimization
Ayal Zaks committed
1556 1557
Perform SMS based modulo scheduling before the first scheduling pass

1558 1559 1560 1561
fmodulo-sched-allow-regmoves
Common Report Var(flag_modulo_sched_allow_regmoves)
Perform SMS based modulo scheduling with register moves allowed

1562
fmove-loop-invariants
1563
Common Report Var(flag_move_loop_invariants) Init(1) Optimization
1564 1565
Move loop invariant computations out of loops

1566
fdce
1567
Common Var(flag_dce) Init(1) Optimization
1568 1569 1570
Use the RTL dead code elimination pass

fdse
1571
Common Var(flag_dse) Init(1) Optimization
1572 1573
Use the RTL dead store elimination pass

1574
freschedule-modulo-scheduled-loops
1575
Common Report Var(flag_resched_modulo_sched) Optimization
1576 1577
Enable/Disable the traditional scheduling in loops that already passed modulo scheduling

1578
fnon-call-exceptions
1579
Common Report Var(flag_non_call_exceptions) Optimization
1580
Support synchronous non-call exceptions
1581

Neil Booth committed
1582
fomit-frame-pointer
1583
Common Report Var(flag_omit_frame_pointer) Optimization
1584
When possible do not generate stack frames
Neil Booth committed
1585

1586 1587 1588 1589 1590 1591 1592 1593
fopt-info
Common Report Var(flag_opt_info) Optimization
Enable all optimization info dumps on stderr

fopt-info-
Common Joined RejectNegative Var(common_deferred_options) Defer
-fopt-info[-<type>=filename]	Dump compiler optimization details

1594
foptimize-register-move
1595
Common Report Var(flag_regmove) Optimization
1596
Do the full register move optimization pass
1597

Neil Booth committed
1598
foptimize-sibling-calls
1599
Common Report Var(flag_optimize_sibling_calls) Optimization
1600
Optimize sibling and tail recursive calls
Neil Booth committed
1601

1602 1603 1604 1605
fpartial-inlining
Common Report Var(flag_partial_inlining)
Perform partial inlining

1606 1607 1608 1609 1610 1611 1612 1613
fpre-ipa-mem-report
Common Report Var(pre_ipa_mem_report)
Report on memory allocation before interprocedural optimization

fpost-ipa-mem-report
Common Report Var(post_ipa_mem_report)
Report on memory allocation before interprocedural optimization

1614
fpack-struct
1615
Common Report Var(flag_pack_struct) Optimization
1616
Pack structure members together without holes
1617

1618
fpack-struct=
1619
Common RejectNegative Joined UInteger Optimization
1620 1621
-fpack-struct=<number>	Set initial maximum structure member alignment

Neil Booth committed
1622
fpcc-struct-return
1623
Common Report Var(flag_pcc_struct_return,1) Init(DEFAULT_PCC_STRUCT_RETURN)
1624
Return small aggregates in memory, not registers
Neil Booth committed
1625 1626

fpeel-loops
1627
Common Report Var(flag_peel_loops) Optimization
1628
Perform loop peeling
Neil Booth committed
1629 1630

fpeephole
1631
Common Report Var(flag_no_peephole,0) Optimization
1632
Enable machine specific peephole optimizations
Neil Booth committed
1633

1634
fpeephole2
1635
Common Report Var(flag_peephole2) Optimization
1636
Enable an RTL peephole pass before sched2
1637

1638
fPIC
1639
Common Report Var(flag_pic,2) Negative(fPIE)
1640 1641 1642
Generate position-independent code if possible (large mode)

fPIE
1643
Common Report Var(flag_pie,2) Negative(fpic)
1644 1645
Generate position-independent code for executables if possible (large mode)

1646
fpic
1647
Common Report Var(flag_pic,1) Negative(fpie)
1648
Generate position-independent code if possible (small mode)
1649 1650

fpie
1651
Common Report Var(flag_pie,1) Negative(fPIC)
1652
Generate position-independent code for executables if possible (small mode)
1653

Diego Novillo committed
1654
fplugin=
1655
Common Joined RejectNegative Var(common_deferred_options) Defer
Diego Novillo committed
1656 1657 1658
Specify a plugin to load

fplugin-arg-
1659
Common Joined RejectNegative Var(common_deferred_options) Defer
1660
-fplugin-arg-<name>-<key>[=<value>]	Specify argument <key>=<value> for plugin <name>
Diego Novillo committed
1661

1662
fpredictive-commoning
1663
Common Report Var(flag_predictive_commoning) Optimization
1664 1665
Run predictive commoning optimization.

Neil Booth committed
1666
fprefetch-loop-arrays
1667
Common Report Var(flag_prefetch_loop_arrays) Init(-1) Optimization
1668
Generate prefetch instructions, if available, for arrays in loops
Neil Booth committed
1669

1670
fprofile
1671
Common Report Var(profile_flag)
1672
Enable basic program profiling code
1673 1674

fprofile-arcs
1675
Common Report Var(profile_arc_flag)
1676
Insert arc-based program profiling code
1677

1678
fprofile-dir=
1679
Common Joined RejectNegative Var(profile_data_prefix)
1680 1681 1682
Set the top-level directory for storing the profile data.
The default is 'pwd'.

1683 1684 1685 1686
fprofile-correction
Common Report Var(flag_profile_correction)
Enable correction of flow inconsistent profile data input

1687 1688 1689 1690
fprofile-generate
Common
Enable common options for generating profile info for profile feedback directed optimizations

1691 1692 1693 1694
fprofile-generate=
Common Joined RejectNegative
Enable common options for generating profile info for profile feedback directed optimizations, and set -fprofile-dir=

1695
fprofile-use
1696
Common Var(flag_profile_use)
1697 1698
Enable common options for performing profile feedback directed optimizations

1699 1700 1701 1702
fprofile-use=
Common Joined RejectNegative
Enable common options for performing profile feedback directed optimizations, and set -fprofile-dir=

1703
fprofile-values
1704
Common Report Var(flag_profile_values)
1705 1706
Insert code to profile values of expressions

1707 1708 1709 1710
fprofile-report
Common Report Var(profile_report)
Report on consistency of profile

Neil Booth committed
1711
frandom-seed
1712
Common Var(common_deferred_options) Defer
Neil Booth committed
1713 1714

frandom-seed=
1715
Common Joined RejectNegative Var(common_deferred_options) Defer
Neil Booth committed
1716
-frandom-seed=<string>	Make compile reproducible using <string>
Neil Booth committed
1717

1718 1719 1720 1721 1722 1723 1724 1725 1726 1727
; This switch causes the command line that was used to create an
; object file to be recorded into the object file.  The exact format
; of this recording is target and binary file format dependent.
; It is related to the -fverbose-asm switch, but that switch only
; records information in the assembler output file as comments, so
; they never reach the object file.
frecord-gcc-switches
Common Report Var(flag_record_gcc_switches)
Record gcc command line switches in the object file.

Neil Booth committed
1728
freg-struct-return
1729
Common Report Var(flag_pcc_struct_return,0) Optimization
1730
Return small aggregates in registers
Neil Booth committed
1731

1732
fregmove
1733
Common Report Var(flag_regmove) Optimization
1734
Enables a register move optimization
1735 1736

frename-registers
1737
Common Report Var(flag_rename_registers) Init(2) Optimization
1738
Perform a register renaming optimization pass
1739 1740

freorder-blocks
1741
Common Report Var(flag_reorder_blocks) Optimization
1742
Reorder basic blocks to improve code placement
1743

1744
freorder-blocks-and-partition
1745
Common Report Var(flag_reorder_blocks_and_partition) Optimization
1746 1747
Reorder basic blocks and partition into hot and cold sections

1748
freorder-functions
1749
Common Report Var(flag_reorder_functions) Optimization
1750
Reorder functions to improve code placement
1751

Neil Booth committed
1752
frerun-cse-after-loop
1753
Common Report Var(flag_rerun_cse_after_loop) Optimization
1754
Add a common subexpression elimination pass after loop optimizations
Neil Booth committed
1755

1756
frerun-loop-opt
1757
Common Ignore
1758
Does nothing.  Preserved for backward compatibility.
1759

1760
frounding-math
1761
Common Report Var(flag_rounding_math) Optimization SetByCombined
1762 1763
Disable optimizations that assume default FP rounding behavior

1764
fsched-interblock
1765
Common Report Var(flag_schedule_interblock) Init(1) Optimization
1766
Enable scheduling across basic blocks
1767

1768 1769 1770 1771
fsched-pressure
Common Report Var(flag_sched_pressure) Init(0) Optimization
Enable register pressure sensitive insn scheduling

1772
fsched-spec
1773
Common Report Var(flag_schedule_speculative) Init(1) Optimization
1774
Allow speculative motion of non-loads
1775 1776

fsched-spec-load
1777
Common Report Var(flag_schedule_speculative_load) Optimization
1778
Allow speculative motion of some loads
1779 1780

fsched-spec-load-dangerous
1781
Common Report Var(flag_schedule_speculative_load_dangerous) Optimization
1782
Allow speculative motion of more loads
1783

Neil Booth committed
1784
fsched-verbose=
1785
Common RejectNegative Joined UInteger Var(sched_verbose_param)
Neil Booth committed
1786
-fsched-verbose=<number>	Set the verbosity level of the scheduler
Neil Booth committed
1787

1788
fsched2-use-superblocks
1789
Common Report Var(flag_sched2_use_superblocks) Optimization
1790
If scheduling post reload, do superblock scheduling
1791 1792

fsched2-use-traces
1793
Common Ignore
1794
Does nothing.  Preserved for backward compatibility.
1795

Neil Booth committed
1796
fschedule-insns
1797
Common Report Var(flag_schedule_insns) Optimization
1798
Reschedule instructions before register allocation
Neil Booth committed
1799 1800

fschedule-insns2
1801
Common Report Var(flag_schedule_insns_after_reload) Optimization
1802
Reschedule instructions after register allocation
Neil Booth committed
1803

1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826
; This flag should be on when a target implements non-trivial
; scheduling hooks, maybe saving some information for its own sake.
; On IA64, for example, this is used for correct bundling. 
fselective-scheduling
Common Report Var(flag_selective_scheduling) Optimization
Schedule instructions using selective scheduling algorithm

fselective-scheduling2
Common Report Var(flag_selective_scheduling2) Optimization 
Run selective scheduling after reload

fsel-sched-pipelining
Common Report Var(flag_sel_sched_pipelining) Init(0) Optimization
Perform software pipelining of inner loops during selective scheduling

fsel-sched-pipelining-outer-loops
Common Report Var(flag_sel_sched_pipelining_outer_loops) Init(0) Optimization
Perform software pipelining of outer loops during selective scheduling

fsel-sched-reschedule-pipelined
Common Report Var(flag_sel_sched_reschedule_pipelined) Init(0) Optimization
Reschedule pipelined regions without pipelining

1827 1828
; sched_stalled_insns means that insns can be moved prematurely from the queue
; of stalled insns into the ready list.
1829
fsched-stalled-insns
1830
Common Report Var(flag_sched_stalled_insns) Optimization UInteger
1831 1832 1833
Allow premature scheduling of queued insns

fsched-stalled-insns=
Mike Stump committed
1834
Common RejectNegative Joined UInteger
1835
-fsched-stalled-insns=<number>	Set number of queued insns that can be prematurely scheduled
1836

1837 1838 1839 1840
; sched_stalled_insns_dep controls how many recently scheduled cycles will
; be examined for a dependency on a stalled insn that is candidate for
; premature removal from the queue of stalled insns into the ready list (has
; an effect only if the flag 'sched_stalled_insns' is set).
1841
fsched-stalled-insns-dep
1842
Common Report Var(flag_sched_stalled_insns_dep,1) Init(1) Optimization UInteger
1843 1844 1845 1846
Set dependence distance checking in premature scheduling of queued insns

fsched-stalled-insns-dep=
Common RejectNegative Joined UInteger
1847
-fsched-stalled-insns-dep=<number>	Set dependence distance checking in premature scheduling of queued insns
1848

1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872
fsched-group-heuristic
Common Report Var(flag_sched_group_heuristic) Init(1) Optimization
Enable the group heuristic in the scheduler

fsched-critical-path-heuristic
Common Report Var(flag_sched_critical_path_heuristic) Init(1) Optimization
Enable the critical path heuristic in the scheduler

fsched-spec-insn-heuristic
Common Report Var(flag_sched_spec_insn_heuristic) Init(1) Optimization
Enable the speculative instruction heuristic in the scheduler

fsched-rank-heuristic
Common Report Var(flag_sched_rank_heuristic) Init(1) Optimization
Enable the rank heuristic in the scheduler

fsched-last-insn-heuristic
Common Report Var(flag_sched_last_insn_heuristic) Init(1) Optimization
Enable the last instruction heuristic in the scheduler

fsched-dep-count-heuristic
Common Report Var(flag_sched_dep_count_heuristic) Init(1) Optimization
Enable the dependent count heuristic in the scheduler

1873
fsection-anchors
1874
Common Report Var(flag_section_anchors) Optimization
1875 1876
Access data in the same section from shared anchor points

Razya Ladelsky committed
1877
fsee
1878
Common Ignore
Sergei Dyshel committed
1879
Does nothing.  Preserved for backward compatibility.
Razya Ladelsky committed
1880

1881
fzee
1882 1883 1884 1885 1886 1887
Common Ignore
Does nothing.  Preserved for backward compatibility.

free
Common Report Var(flag_ree) Init(0)
Turn on Redundant Extensions Elimination pass.
1888

1889
fshow-column
1890
Common Report Var(flag_show_column) Init(1)
1891
Show column numbers in diagnostics, when available.  Default on
1892

1893 1894 1895 1896 1897
fshrink-wrap
Common Report Var(flag_shrink_wrap) Optimization
Emit function prologues only before parts of the function that need it,
rather than at the top of the function.

1898
fsignaling-nans
1899
Common Report Var(flag_signaling_nans) Optimization SetByCombined
1900
Disable optimizations observable by IEEE signaling NaNs
1901

1902
fsigned-zeros
1903
Common Report Var(flag_signed_zeros) Init(1) Optimization SetByCombined
1904 1905
Disable floating point optimizations that ignore the IEEE signedness of zero

1906
fsingle-precision-constant
1907
Common Report Var(flag_single_precision_constant) Optimization
1908
Convert floating point constants to single precision constants
1909

1910
fsplit-ivs-in-unroller
1911
Common Report Var(flag_split_ivs_in_unroller) Init(1) Optimization
1912
Split lifetimes of induction variables when loops are unrolled
1913

1914 1915 1916 1917
fsplit-stack
Common Report Var(flag_split_stack) Init(-1)
Generate discontiguous stack frames

1918
fsplit-wide-types
1919
Common Report Var(flag_split_wide_types) Optimization
1920 1921
Split wide types into independent registers

1922
fvariable-expansion-in-unroller
1923
Common Report Var(flag_variable_expansion_in_unroller) Optimization
1924
Apply variable expansion when loops are unrolled
1925

1926 1927 1928 1929
fstack-check=
Common Report RejectNegative Joined
-fstack-check=[no|generic|specific]	Insert stack checking code into the program

1930
fstack-check
1931
Common Alias(fstack-check=, specific, no)
1932
Insert stack checking code into the program.  Same as -fstack-check=specific
1933

Neil Booth committed
1934
fstack-limit
1935
Common Var(common_deferred_options) Defer
Neil Booth committed
1936

Neil Booth committed
1937
fstack-limit-register=
1938
Common RejectNegative Joined Var(common_deferred_options) Defer
Neil Booth committed
1939
-fstack-limit-register=<register>	Trap if the stack goes past <register>
Neil Booth committed
1940 1941

fstack-limit-symbol=
1942
Common RejectNegative Joined Var(common_deferred_options) Defer
Neil Booth committed
1943
-fstack-limit-symbol=<name>	Trap if the stack goes past symbol <name>
Neil Booth committed
1944

1945 1946 1947 1948 1949
fstack-protector
Common Report Var(flag_stack_protect, 1)
Use propolice as a stack protection method

fstack-protector-all
1950
Common Report RejectNegative Var(flag_stack_protect, 2)
1951 1952
Use a stack protection method for every function

1953 1954 1955 1956
fstack-protector-strong
Common Report RejectNegative Var(flag_stack_protect, 3)
Use a smart stack protection method for certain functions

Eric Botcazou committed
1957 1958 1959 1960
fstack-usage
Common RejectNegative Var(flag_stack_usage)
Output stack usage information on a per-function basis

Neil Booth committed
1961
fstrength-reduce
1962
Common Ignore
1963
Does nothing.  Preserved for backward compatibility.
Neil Booth committed
1964

1965 1966 1967 1968
; Nonzero if we should do (language-dependent) alias analysis.
; Typically, this analysis will assume that expressions of certain
; types do not alias expressions of certain other types.  Only used
; if alias analysis (in general) is enabled.
1969
fstrict-aliasing
1970
Common Report Var(flag_strict_aliasing) Optimization
1971
Assume strict aliasing rules apply
1972

1973 1974 1975 1976
fstrict-overflow
Common Report Var(flag_strict_overflow)
Treat signed overflow as undefined

1977 1978 1979 1980
fsync-libcalls
Common Report Var(flag_sync_libcalls) Init(1)
Implement __atomic operations via libcalls to legacy __sync functions

Neil Booth committed
1981
fsyntax-only
1982
Common Report Var(flag_syntax_only)
1983
Check for syntax errors, then stop
Neil Booth committed
1984

1985
ftest-coverage
1986
Common Report Var(flag_test_coverage)
1987
Create data files needed by \"gcov\"
1988

Neil Booth committed
1989
fthread-jumps
1990
Common Report Var(flag_thread_jumps) Optimization
1991
Perform jump threading optimizations
Neil Booth committed
1992

1993
ftime-report
1994
Common Report Var(time_report)
1995
Report the time taken by each compiler pass
1996

Neil Booth committed
1997
ftls-model=
1998
Common Joined RejectNegative Enum(tls_model) Var(flag_tls_default) Init(TLS_MODEL_GLOBAL_DYNAMIC)
Neil Booth committed
1999
-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec]	Set the default thread-local storage code generation model
Neil Booth committed
2000

2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
Enum
Name(tls_model) Type(enum tls_model) UnknownError(unknown TLS model %qs)

EnumValue
Enum(tls_model) String(global-dynamic) Value(TLS_MODEL_GLOBAL_DYNAMIC)

EnumValue
Enum(tls_model) String(local-dynamic) Value(TLS_MODEL_LOCAL_DYNAMIC)

EnumValue
Enum(tls_model) String(initial-exec) Value(TLS_MODEL_INITIAL_EXEC)

EnumValue
Enum(tls_model) String(local-exec) Value(TLS_MODEL_LOCAL_EXEC)

2016
ftoplevel-reorder
2017
Common Report Var(flag_toplevel_reorder) Init(2) Optimization
2018 2019
Reorder top level functions, variables, and asms

Neil Booth committed
2020
ftracer
2021
Common Report Var(flag_tracer)
2022
Perform superblock formation via tail duplication
Neil Booth committed
2023

2024 2025 2026
; Zero means that floating-point math operations cannot generate a
; (user-visible) trap.  This is the case, for example, in nonstop
; IEEE 754 arithmetic.
2027
ftrapping-math
2028
Common Report Var(flag_trapping_math) Init(1) Optimization SetByCombined
2029
Assume floating-point operations can trap
2030 2031

ftrapv
2032
Common Report Var(flag_trapv) Optimization
2033
Trap for signed overflow in addition, subtraction and multiplication
2034

2035
ftree-ccp
2036
Common Report Var(flag_tree_ccp) Optimization
2037 2038
Enable SSA-CCP optimization on trees

2039 2040 2041 2042
ftree-bit-ccp
Common Report Var(flag_tree_bit_ccp) Optimization
Enable SSA-BIT-CCP optimization on trees

2043
ftree-store-ccp
2044
Common Ignore
2045
Does nothing.  Preserved for backward compatibility.
2046

2047
ftree-ch
2048
Common Report Var(flag_tree_ch) Optimization
2049 2050
Enable loop header copying on trees

2051 2052 2053 2054 2055 2056 2057 2058
ftree-coalesce-inlined-vars
Common Report Var(flag_ssa_coalesce_vars,1) Init(2) RejectNegative Optimization
Enable coalescing of copy-related user variables that are inlined

ftree-coalesce-vars
Common Report Var(flag_ssa_coalesce_vars,2) Optimization
Enable coalescing of all copy-related user variables

2059
ftree-copyrename
2060
Common Report Var(flag_tree_copyrename) Optimization
2061
Replace SSA temporaries with better names in copies
2062

2063
ftree-copy-prop
2064
Common Report Var(flag_tree_copy_prop) Optimization
2065 2066 2067
Enable copy propagation on trees

ftree-store-copy-prop
2068
Common Ignore
2069
Does nothing.  Preserved for backward compatibility.
2070

2071 2072 2073 2074
ftree-cselim
Common Report Var(flag_tree_cselim) Init(2) Optimization
Transform condition stores into unconditional ones

2075 2076 2077 2078
ftree-switch-conversion
Common Report Var(flag_tree_switch_conversion) Optimization
Perform conversions of switch initializations.

2079
ftree-dce
2080
Common Report Var(flag_tree_dce) Optimization
2081 2082 2083
Enable SSA dead code elimination optimization on trees

ftree-dominator-opts
2084
Common Report Var(flag_tree_dom) Optimization
2085 2086
Enable dominator optimizations

2087 2088 2089 2090
ftree-tail-merge
Common Report Var(flag_tree_tail_merge) Optimization
Enable tail merging on trees

2091
ftree-dse
2092
Common Report Var(flag_tree_dse) Optimization
2093 2094
Enable dead store elimination

2095 2096 2097 2098
ftree-forwprop
Common Report Var(flag_tree_forwprop) Init(1) Optimization
Enable forward propagation on trees

2099
ftree-fre
2100
Common Report Var(flag_tree_fre) Optimization
2101 2102
Enable Full Redundancy Elimination (FRE) on trees

2103 2104 2105 2106
foptimize-strlen
Common Report Var(flag_optimize_strlen) Optimization
Enable string length optimizations on trees

2107
ftree-loop-distribution
2108
Common Report Var(flag_tree_loop_distribution) Optimization
2109 2110
Enable loop distribution on trees

2111 2112 2113 2114
ftree-loop-distribute-patterns
Common Report Var(flag_tree_loop_distribute_patterns) Optimization
Enable loop distribution for patterns transformed into a library call

2115
ftree-loop-im
2116
Common Report Var(flag_tree_loop_im) Init(1) Optimization
2117 2118
Enable loop invariant motion on trees

2119
ftree-loop-linear
2120 2121
Common Alias(floop-interchange)
Enable loop interchange transforms.  Same as -floop-interchange
2122

2123
ftree-loop-ivcanon
2124
Common Report Var(flag_tree_loop_ivcanon) Init(1) Optimization
2125 2126
Create canonical induction variables in loops

2127
ftree-loop-optimize
2128
Common Report Var(flag_tree_loop_optimize) Init(1) Optimization
2129 2130
Enable loop optimizations on tree level

2131
ftree-parallelize-loops=
2132
Common Report Joined RejectNegative UInteger Var(flag_tree_parallelize_loops) Init(1)
2133 2134
Enable automatic parallelization of loops

2135 2136 2137 2138
ftree-phiprop
Common Report Var(flag_tree_phiprop) Init(1) Optimization
Enable hoisting loads from conditional pointers.

2139
ftree-pre
2140
Common Report Var(flag_tree_pre) Optimization
2141 2142
Enable SSA-PRE optimization on trees

2143 2144 2145 2146
ftree-partial-pre
Common Report Var(flag_tree_partial_pre) Optimization
In SSA-PRE optimization on trees, enable partial-partial redundancy elimination

2147 2148 2149 2150
ftree-pta
Common Report Var(flag_tree_pta) Init(1) Optimization
Perform function-local points-to analysis on trees.

2151 2152 2153 2154
ftree-reassoc
Common Report Var(flag_tree_reassoc) Init(1) Optimization
Enable reassociation on tree level

2155
ftree-salias
2156
Common Ignore
2157
Does nothing.  Preserved for backward compatibility.
2158

2159
ftree-sink
2160
Common Report Var(flag_tree_sink) Optimization
2161 2162
Enable SSA code sinking on trees

2163 2164 2165 2166
ftree-slsr
Common Report Var(flag_tree_slsr) Optimization
Perform straight-line strength reduction

2167
ftree-sra
2168
Common Report Var(flag_tree_sra) Optimization
2169 2170 2171
Perform scalar replacement of aggregates

ftree-ter
2172
Common Report Var(flag_tree_ter) Optimization
2173 2174
Replace temporary expressions in the SSA->normal pass

2175 2176 2177 2178
ftree-lrs
Common Report Var(flag_tree_live_range_split) Optimization
Perform live range splitting during the SSA->normal pass

2179
ftree-vrp
2180
Common Report Var(flag_tree_vrp) Init(0) Optimization
2181 2182
Perform Value Range Propagation on trees

Neil Booth committed
2183
funit-at-a-time
2184
Common Report Var(flag_unit_at_a_time) Init(1) Optimization
2185
Compile whole compilation unit at a time
Neil Booth committed
2186 2187

funroll-loops
2188
Common Report Var(flag_unroll_loops) Optimization
2189
Perform loop unrolling when iteration count is known
Neil Booth committed
2190 2191

funroll-all-loops
2192
Common Report Var(flag_unroll_all_loops) Optimization
2193
Perform loop unrolling for all loops
Neil Booth committed
2194

2195 2196 2197 2198
; Nonzero means that loop optimizer may assume that the induction variables
; that control loops do not overflow and that the loops with nontrivial
; exit condition are not infinite
funsafe-loop-optimizations
2199
Common Report Var(flag_unsafe_loop_optimizations) Optimization
2200 2201
Allow loop optimizations to assume that the loops behave in normal way

2202
fassociative-math
2203
Common Report Var(flag_associative_math) SetByCombined
2204 2205 2206 2207
Allow optimization for floating-point arithmetic which may change the
result of the operation due to rounding.

freciprocal-math
2208
Common Report Var(flag_reciprocal_math) SetByCombined
2209 2210
Same as -fassociative-math for expressions which include division.

2211 2212 2213 2214
; Nonzero means that unsafe floating-point math optimizations are allowed
; for the sake of speed.  IEEE compliance is not guaranteed, and operations
; are allowed to assume that their arguments and results are "normal"
; (e.g., nonnegative for SQRT).
2215
funsafe-math-optimizations
2216
Common Report Var(flag_unsafe_math_optimizations) Optimization SetByCombined
2217
Allow math optimizations that may violate IEEE or ISO standards
2218

Neil Booth committed
2219
funswitch-loops
2220
Common Report Var(flag_unswitch_loops) Optimization
2221
Perform loop unswitching
Neil Booth committed
2222

2223
funwind-tables
2224
Common Report Var(flag_unwind_tables) Optimization
2225
Just generate unwind tables for exception handling
2226

2227 2228 2229 2230 2231 2232 2233 2234
fuse-ld=bfd
Common Negative(fuse-ld=gold)
Use the bfd linker instead of the default linker

fuse-ld=gold
Common Negative(fuse-ld=bfd)
Use the gold linker instead of the default linker

2235 2236 2237
fuse-linker-plugin
Common Undocumented

2238 2239 2240 2241 2242
; Positive if we should track variables, negative if we should run
; the var-tracking pass only to discard debug annotations, zero if
; we're not to run it.  When flag_var_tracking == 2 (AUTODETECT_VALUE) it
; will be set according to optimize, debug_info_level and debug_hooks
; in process_options ().
2243
fvar-tracking
2244
Common Report Var(flag_var_tracking) Init(2) Optimization
2245 2246
Perform variable tracking

2247 2248 2249 2250
; Positive if we should track variables at assignments, negative if
; we should run the var-tracking pass only to discard debug
; annotations.  When flag_var_tracking_assignments ==
; AUTODETECT_VALUE it will be set according to flag_var_tracking.
2251
fvar-tracking-assignments
2252
Common Report Var(flag_var_tracking_assignments) Init(2) Optimization
2253 2254
Perform variable tracking by annotating assignments

2255 2256
; Nonzero if we should toggle flag_var_tracking_assignments after
; processing options and computing its default.  */
2257
fvar-tracking-assignments-toggle
2258
Common Report Var(flag_var_tracking_assignments_toggle) Optimization
2259 2260
Toggle -fvar-tracking-assignments

2261 2262 2263 2264
; Positive if we should track uninitialized variables, negative if
; we should run the var-tracking pass only to discard debug
; annotations.  When flag_var_tracking_uninit == AUTODETECT_VALUE it
; will be set according to flag_var_tracking.
2265 2266 2267 2268
fvar-tracking-uninit
Common Report Var(flag_var_tracking_uninit) Optimization
Perform variable tracking and also tag variables that are uninitialized

2269
ftree-vectorize
2270
Common Report Var(flag_tree_vectorize) Optimization
2271
Enable vectorization on trees
2272

2273 2274 2275 2276
ftree-vectorizer-verbose=
Common RejectNegative Joined UInteger Var(common_deferred_options) Defer
-ftree-vectorizer-verbose=<number>	This switch is deprecated. Use -fopt-info instead.

2277 2278 2279 2280
ftree-loop-vectorize
Common Report Var(flag_tree_loop_vectorize) Optimization
Enable loop vectorization on trees

2281
ftree-slp-vectorize
2282
Common Report Var(flag_tree_slp_vectorize) Optimization
2283 2284
Enable basic block vectorization (SLP) on trees

2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300
fvect-cost-model=
Common Joined RejectNegative Enum(vect_cost_model) Var(flag_vect_cost_model) Init(VECT_COST_MODEL_DEFAULT)
Specifies the cost model for vectorization
 
Enum
Name(vect_cost_model) Type(enum vect_cost_model) UnknownError(unknown vectorizer cost model %qs)

EnumValue
Enum(vect_cost_model) String(unlimited) Value(VECT_COST_MODEL_UNLIMITED)

EnumValue
Enum(vect_cost_model) String(dynamic) Value(VECT_COST_MODEL_DYNAMIC)

EnumValue
Enum(vect_cost_model) String(cheap) Value(VECT_COST_MODEL_CHEAP)

2301
fvect-cost-model
2302 2303 2304 2305 2306 2307
Common RejectNegative Alias(fvect-cost-model=,dynamic)
Enables the dynamic vectorizer cost model.  Preserved for backward compatibility.

fno-vect-cost-model
Common RejectNegative Alias(fvect-cost-model=,unlimited)
Enables the unlimited vectorizer cost model.  Preserved for backward compatibility.
2308

2309
ftree-vect-loop-version
2310 2311
Common Ignore
Does nothing. Preserved for backward compatibility.
2312

2313
ftree-scev-cprop
2314
Common Report Var(flag_tree_scev_cprop) Init(1) Optimization
2315 2316
Enable copy propagation of scalar-evolution information.

2317 2318 2319 2320 2321 2322
; -fverbose-asm causes extra commentary information to be produced in
; the generated assembly code (to make it more readable).  This option
; is generally only of use to those who actually need to read the
; generated assembly code (perhaps while debugging the compiler itself).
; -fno-verbose-asm, the default, causes the extra information
; to not be added and is useful when comparing two assembler files.
2323
fverbose-asm
2324
Common Report Var(flag_verbose_asm)
2325
Add extra commentary to assembler output
2326

2327
fvisibility=
2328
Common Joined RejectNegative Enum(symbol_visibility) Var(default_visibility) Init(VISIBILITY_DEFAULT)
2329 2330
-fvisibility=[default|internal|hidden|protected]	Set the default symbol visibility

2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344
Enum
Name(symbol_visibility) Type(enum symbol_visibility) UnknownError(unrecognized visibility value %qs)

EnumValue
Enum(symbol_visibility) String(default) Value(VISIBILITY_DEFAULT)

EnumValue
Enum(symbol_visibility) String(internal) Value(VISIBILITY_INTERNAL)

EnumValue
Enum(symbol_visibility) String(hidden) Value(VISIBILITY_HIDDEN)

EnumValue
Enum(symbol_visibility) String(protected) Value(VISIBILITY_PROTECTED)
2345

2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369
fvtable-verify=
Common Joined RejectNegative Enum(vtv_priority) Var(flag_vtable_verify) Init(VTV_NO_PRIORITY)
Validate vtable pointers before using them.

Enum
Name(vtv_priority) Type(enum vtv_priority) UnknownError(unknown vtable verify initialization priority %qs)

EnumValue
Enum(vtv_priority) String(none) Value(VTV_NO_PRIORITY)

EnumValue
Enum(vtv_priority) String(std) Value(VTV_STANDARD_PRIORITY)

EnumValue
Enum(vtv_priority) String(preinit) Value(VTV_PREINIT_PRIORITY)

fvtv-counts
Common Var(flag_vtv_counts)
Output vtable verification counters.

fvtv-debug
Common Var(flag_vtv_debug)
Output vtable verification pointer sets information.

2370
fvpt
2371
Common Report Var(flag_value_profile_transformations) Optimization
2372 2373
Use expression value profiles in optimizations

Jan Hubicka committed
2374
fweb
2375
Common Report Var(flag_web) Init(2) Optimization
Jan Hubicka committed
2376 2377
Construct webs and split unrelated uses of single variable

2378 2379 2380 2381
ftree-builtin-call-dce
Common Report Var(flag_tree_builtin_call_dce) Init(0) Optimization
Enable conditional dead code elimination for builtin calls

2382
fwhole-program
2383
Common Report Var(flag_whole_program) Init(0) Optimization
2384 2385
Perform whole program optimizations

2386
fwrapv
2387
Common Report Var(flag_wrapv) Optimization
2388
Assume signed arithmetic overflow wraps around
2389 2390

fzero-initialized-in-bss
2391
Common Report Var(flag_zero_initialized_in_bss) Init(1)
2392
Put zero initialized data in the bss section
2393

2394 2395
g
Common JoinedOrMissing
2396 2397 2398
Generate debug information in default format

gcoff
2399
Common JoinedOrMissing Negative(gdwarf)
2400 2401
Generate debug information in COFF format

2402 2403 2404 2405
gdwarf
Common JoinedOrMissing Negative(gdwarf-)
Generate debug information in default version of DWARF format

2406
gdwarf-
2407
Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
2408
Generate debug information in DWARF v2 (or later) format
2409 2410 2411 2412 2413

ggdb
Common JoinedOrMissing
Generate debug information in default extended format

2414 2415 2416 2417 2418 2419 2420 2421
gno-pubnames
Common RejectNegative Var(debug_generate_pub_sections, 0) Init(-1)
Don't generate DWARF pubnames and pubtypes sections.

gpubnames
Common RejectNegative Var(debug_generate_pub_sections, 1)
Generate DWARF pubnames and pubtypes sections.

2422
gno-record-gcc-switches
2423
Common RejectNegative Var(dwarf_record_gcc_switches,0) Init(1)
2424 2425 2426 2427 2428 2429
Don't record gcc command line switches in DWARF DW_AT_producer.

grecord-gcc-switches
Common RejectNegative Var(dwarf_record_gcc_switches,1)
Record gcc command line switches in DWARF DW_AT_producer.

2430 2431 2432 2433 2434 2435 2436 2437
gno-split-dwarf
Common Driver RejectNegative Var(dwarf_split_debug_info,0) Init(0)
Don't generate debug information in separate .dwo files

gsplit-dwarf
Common Driver RejectNegative Var(dwarf_split_debug_info,1)
Generate debug information in separate .dwo files

2438
gstabs
2439
Common JoinedOrMissing Negative(gstabs+)
2440 2441 2442
Generate debug information in STABS format

gstabs+
2443
Common JoinedOrMissing Negative(gvms)
2444 2445
Generate debug information in extended STABS format

2446
gno-strict-dwarf
2447
Common RejectNegative Var(dwarf_strict,0) Init(0)
2448 2449 2450
Emit DWARF additions beyond selected version

gstrict-dwarf
2451
Common Report RejectNegative Var(dwarf_strict,1)
2452 2453
Don't emit DWARF additions beyond selected version

2454 2455 2456 2457
gtoggle
Common Report Var(flag_gtoggle)
Toggle debug information generation

2458
gvms
2459
Common JoinedOrMissing Negative(gxcoff)
2460 2461 2462
Generate debug information in VMS format

gxcoff
2463
Common JoinedOrMissing Negative(gxcoff+)
2464 2465 2466
Generate debug information in XCOFF format

gxcoff+
2467
Common JoinedOrMissing Negative(gcoff)
2468
Generate debug information in extended XCOFF format
2469

2470 2471 2472
h
Driver Joined Separate

2473 2474 2475 2476
iplugindir=
Common Joined Var(plugindir_string) Init(0)
-iplugindir=<dir>	Set <dir> to be the default plugin directory

2477 2478 2479 2480
imultiarch
Common Joined Separate RejectDriver Var(imultiarch) Init(0)
-imultiarch <dir>	Set <dir> to be the multiarch include subdirectory

2481 2482 2483
l
Driver Joined Separate

2484 2485 2486
n
Driver

2487 2488 2489
no-canonical-prefixes
Driver

2490 2491 2492
nodefaultlibs
Driver

2493 2494 2495
nostartfiles
Driver

2496 2497 2498
nostdlib
Driver

2499
o
2500
Common Driver Joined Separate Var(asm_file_name) MissingArgError(missing filename after %qs)
Neil Booth committed
2501
-o <file>	Place output into <file>
2502 2503

p
2504
Common Var(profile_flag)
Neil Booth committed
2505
Enable function profiling
2506

2507 2508 2509
pass-exit-codes
Driver Var(pass_exit_codes)

2510
pedantic
2511
Common Alias(Wpedantic)
2512 2513

pedantic-errors
2514
Common Var(flag_pedantic_errors)
Neil Booth committed
2515
Like -pedantic but issue them as errors
2516

2517 2518 2519
pg
Driver

2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536
pipe
Driver Var(use_pipes)

print-file-name=
Driver JoinedOrMissing Var(print_file_name)

print-libgcc-file-name
Driver

print-multi-directory
Driver Var(print_multi_directory)

print-multi-lib
Driver Var(print_multi_lib)

print-multi-os-directory
Driver Var(print_multi_os_directory)
2537 2538 2539
 
print-multiarch
Driver Var(print_multiarch)
2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552

print-prog-name=
Driver JoinedOrMissing Var(print_prog_name)

print-search-dirs
Driver Var(print_search_dirs)

print-sysroot
Driver Var(print_sysroot)

print-sysroot-headers-suffix
Driver Var(print_sysroot_headers_suffix)

2553
quiet
2554
Common Var(quiet_flag) RejectDriver
Neil Booth committed
2555
Do not display functions compiled or elapsed time
2556

2557 2558 2559 2560 2561 2562
r
Driver

s
Driver

2563 2564 2565 2566 2567 2568
save-temps
Driver

save-temps=
Driver Joined

2569 2570 2571
t
Driver

2572 2573 2574 2575 2576 2577
time
Driver Var(report_times)

time=
Driver JoinedOrMissing

2578 2579 2580
u
Driver Joined Separate

Joseph Myers committed
2581 2582 2583 2584
undef
Driver
; C option, but driver must not handle as "-u ndef".

2585
v
2586 2587
Common Driver Var(verbose_flag)
Enable verbose output
2588

2589
version
2590
Common Var(version_flag) RejectDriver
Neil Booth committed
2591
Display the compiler's version
2592 2593

w
2594
Common Var(inhibit_warnings)
Neil Booth committed
2595
Suppress warnings
2596

2597 2598 2599 2600 2601 2602
wrapper
Driver Separate Var(wrapper_string)

x
Driver Joined Separate

2603
shared
2604
Driver RejectNegative Negative(pie)
2605 2606
Create a shared library

2607 2608 2609 2610
shared-libgcc
Driver

specs
2611
Driver Separate Alias(specs=)
2612 2613 2614 2615

specs=
Driver Joined

2616 2617 2618
static
Driver

2619 2620 2621 2622 2623 2624 2625 2626 2627 2628
static-libgcc
Driver

static-libgfortran
Driver
; Documented for Fortran, but always accepted by driver.

static-libstdc++
Driver

2629 2630 2631 2632
static-libgo
Driver
; Documented for Go, but always accepted by driver.

2633 2634 2635
static-libasan
Driver

2636 2637 2638
static-libtsan
Driver

Marek Polacek committed
2639 2640 2641
static-libubsan
Driver

2642 2643 2644
symbolic
Driver

2645
pie
2646
Driver RejectNegative Negative(shared)
2647 2648
Create a position independent executable

2649 2650 2651
z
Driver Joined Separate

2652
; This comment is to ensure we retain the blank line above.