]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/common.opt
2009-04-16 Rafael Avila de Espindola <espindola@google.com>
[thirdparty/gcc.git] / gcc / common.opt
CommitLineData
3272db82 1; Options for the language- and target-independent parts of the compiler.
2e9da478 2
cfaf579d 3; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
7765591b 4; Free Software Foundation, Inc.
3272db82 5;
6; This file is part of GCC.
7;
8; GCC is free software; you can redistribute it and/or modify it under
9; the terms of the GNU General Public License as published by the Free
8c4c00c1 10; Software Foundation; either version 3, or (at your option) any later
3272db82 11; version.
a0c938f0 12;
3272db82 13; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14; WARRANTY; without even the implied warranty of MERCHANTABILITY or
15; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16; for more details.
a0c938f0 17;
3272db82 18; You should have received a copy of the GNU General Public License
8c4c00c1 19; along with GCC; see the file COPYING3. If not see
20; <http://www.gnu.org/licenses/>.
3272db82 21
a4b0007b 22; See the GCC internals manual (options.texi) for a description of this file's format.
3272db82 23
24; Please try to keep this file in ASCII collating order.
25
e690b385 26-help
27Common
53b8e5c1 28Display this information
e690b385 29
87c75316 30-help=
31Common Report Joined
32--help=<class> Display descriptions of a specific class of options. <class> is one or more of optimizers, target, warnings, undocumented, params
da3b1bab 33
e690b385 34-target-help
35Common
87c75316 36Alias for --help=target
37
39932bd2 38;; The following four entries are to work around the gcc driver
87c75316 39;; program's insatiable desire to turn options starting with a
40;; double dash (--) into options starting with a dash f (-f).
41fhelp
2dfeb300 42Common Var(help_flag)
87c75316 43
44fhelp=
45Common Joined
46
47ftarget-help
48Common
49
39932bd2 50fversion
51Common
52
87c75316 53-param
54Common Separate
55--param <param>=<value> Set parameter <param> to value. See below for a complete list of parameters
e690b385 56
57-version
58Common
59
60G
837277ab 61Common Joined Separate UInteger
53b8e5c1 62-G<number> Put global and static data smaller than <number> bytes into a special section (on some targets)
e690b385 63
da3b1bab 64O
46f8e3b0 65Common JoinedOrMissing Optimization
53b8e5c1 66-O<number> Set optimization level to <number>
da3b1bab 67
68Os
46f8e3b0 69Common Optimization
53b8e5c1 70Optimize for space rather than speed
da3b1bab 71
72W
73Common RejectNegative
bb0814ce 74This switch is deprecated; use -Wextra instead
da3b1bab 75
6f2f567f 76Waggregate-return
87c75316 77Common Var(warn_aggregate_return) Warning
bb0814ce 78Warn about returning structures, unions or arrays
6f2f567f 79
5bc96398 80Warray-bounds
e8831472 81Common Var(warn_array_bounds) Warning
5bc96398 82Warn if an array is accessed out of bounds
83
9b2d6d13 84Wattributes
87c75316 85Common Var(warn_attributes) Init(1) Warning
9b2d6d13 86Warn about inappropriate attribute usage
87
6f2f567f 88Wcast-align
87c75316 89Common Var(warn_cast_align) Warning
bb0814ce 90Warn about pointer casts which increase alignment
6f2f567f 91
92Wdeprecated-declarations
87c75316 93Common Var(warn_deprecated_decl) Init(1) Warning
bb0814ce 94Warn about uses of __attribute__((deprecated)) declarations
6f2f567f 95
96Wdisabled-optimization
87c75316 97Common Var(warn_disabled_optimization) Warning
bb0814ce 98Warn when an optimization pass is disabled
6f2f567f 99
100Werror
2e9da478 101Common Var(warnings_are_errors)
bb0814ce 102Treat all warnings as errors
6f2f567f 103
76f02516 104Werror=
105Common Joined
106Treat specified warning as error
107
da3b1bab 108Wextra
87c75316 109Common Warning
53b8e5c1 110Print extra (possibly unwanted) warnings
da3b1bab 111
295acf4f 112Wfatal-errors
2e9da478 113Common Var(flag_fatal_errors)
295acf4f 114Exit on the first error occurred
115
6fdade09 116Wframe-larger-than=
117Common RejectNegative Joined UInteger
15e88abc 118-Wframe-larger-than=<number> Warn if a function's stack frame requires more than <number> bytes
6fdade09 119
6f2f567f 120Winline
87c75316 121Common Var(warn_inline) Warning
bb0814ce 122Warn when an inlined function cannot be inlined
6f2f567f 123
124Wlarger-than-
87c75316 125Common RejectNegative Joined UInteger Warning
17c66687 126
127Wlarger-than=
128Common RejectNegative Joined UInteger Warning
129-Wlarger-than=<number> Warn if an object is larger than <number> bytes
6f2f567f 130
b13d1547 131Wlogical-op
132Common Warning Var(warn_logical_op)
133Warn when a logical operator is suspicously always evaluating to true or false
134
7e3cc681 135Wunsafe-loop-optimizations
87c75316 136Common Var(warn_unsafe_loop_optimizations) Warning
7e3cc681 137Warn if the loop cannot be optimized due to nontrivial assumptions.
138
6f2f567f 139Wmissing-noreturn
87c75316 140Common Var(warn_missing_noreturn) Warning
bb0814ce 141Warn about functions which might be candidates for __attribute__((noreturn))
6f2f567f 142
f63eb5d3 143Wmudflap
144Common Var(warn_mudflap) Init(1) Warning
145Warn about constructs not instrumented by -fmudflap
146
55972f40 147Woverflow
87c75316 148Common Var(warn_overflow) Init(1) Warning
55972f40 149Warn about overflow in arithmetic expressions
150
6f2f567f 151Wpacked
87c75316 152Common Var(warn_packed) Warning
bb0814ce 153Warn when the packed attribute has no effect on struct layout
6f2f567f 154
155Wpadded
87c75316 156Common Var(warn_padded) Warning
bb0814ce 157Warn when padding is required to align structure members
6f2f567f 158
159Wshadow
87c75316 160Common Var(warn_shadow) Warning
bb0814ce 161Warn when one local variable shadows another
6f2f567f 162
f1a0edff 163Wstack-protector
87c75316 164Common Var(warn_stack_protect) Warning
f1a0edff 165Warn when not issuing stack smashing protection for some reason
166
6f2f567f 167Wstrict-aliasing
87c75316 168Common Warning
bb0814ce 169Warn about code which might break strict aliasing rules
6f2f567f 170
c1628b55 171Wstrict-aliasing=
a54ab330 172Common Joined UInteger Var(warn_strict_aliasing) Init(-1) Warning
c1628b55 173Warn about code which might break strict aliasing rules
174
add6ee5e 175Wstrict-overflow
e8831472 176Common Warning
add6ee5e 177Warn about optimizations that assume that signed overflow is undefined
178
179Wstrict-overflow=
a54ab330 180Common Joined UInteger Var(warn_strict_overflow) Init(-1) Warning
add6ee5e 181Warn about optimizations that assume that signed overflow is undefined
182
6f2f567f 183Wswitch
87c75316 184Common Var(warn_switch) Warning
bb0814ce 185Warn about enumerated switches, with no default, missing a case
6f2f567f 186
187Wswitch-default
87c75316 188Common Var(warn_switch_default) Warning
bb0814ce 189Warn about enumerated switches missing a \"default:\" statement
6f2f567f 190
191Wswitch-enum
87c75316 192Common Var(warn_switch_enum) Warning
bb0814ce 193Warn about all enumerated switches missing a specific case
6f2f567f 194
195Wsystem-headers
87c75316 196Common Var(warn_system_headers) Warning
72528c71 197Do not suppress warnings from system headers
6f2f567f 198
100b67da 199Wtype-limits
200Common Var(warn_type_limits) Init(-1) Warning
201Warn if a comparison is always true or always false due to the limited range of the data type
202
6f2f567f 203Wuninitialized
87c75316 204Common Var(warn_uninitialized) Warning
bb0814ce 205Warn about uninitialized automatic variables
6f2f567f 206
207Wunreachable-code
87c75316 208Common Var(warn_notreached) Warning
bb0814ce 209Warn about code that will never be executed
6f2f567f 210
da3b1bab 211Wunused
278e3a1f 212Common Var(warn_unused) Init(0) Warning
53b8e5c1 213Enable all -Wunused- warnings
da3b1bab 214
6f2f567f 215Wunused-function
278e3a1f 216Common Var(warn_unused_function) Init(-1) Warning
bb0814ce 217Warn when a function is unused
6f2f567f 218
219Wunused-label
278e3a1f 220Common Var(warn_unused_label) Init(-1) Warning
bb0814ce 221Warn when a label is unused
6f2f567f 222
223Wunused-parameter
278e3a1f 224Common Var(warn_unused_parameter) Init(-1) Warning
bb0814ce 225Warn when a function parameter is unused
6f2f567f 226
227Wunused-value
278e3a1f 228Common Var(warn_unused_value) Init(-1) Warning
bb0814ce 229Warn when an expression value is unused
6f2f567f 230
231Wunused-variable
278e3a1f 232Common Var(warn_unused_variable) Init(-1) Warning
bb0814ce 233Warn when a variable is unused
6f2f567f 234
c81ed7c1 235Wcoverage-mismatch
e8831472 236Common RejectNegative Var(warn_coverage_mismatch) Warning
c81ed7c1 237Warn instead of error in case profiles in -fprofile-use do not match
238
e690b385 239aux-info
240Common Separate
53b8e5c1 241-aux-info <file> Emit declaration information into <file>
e690b385 242
243aux-info=
244Common Joined
245
246auxbase
247Common Separate
248
249auxbase-strip
250Common Separate
251
252d
253Common Joined
53b8e5c1 254-d<letters> Enable dumps from specific passes of the compiler
e690b385 255
256dumpbase
257Common Separate
53b8e5c1 258-dumpbase <file> Set the file basename to be used for dumps
e690b385 259
82a16202 260; The version of the C++ ABI in use. The following values are allowed:
261;
262; 0: The version of the ABI believed most conformant with the C++ ABI
263; specification. This ABI may change as bugs are discovered and fixed.
264; Therefore, 0 will not necessarily indicate the same ABI in different
265; versions of G++.
266;
267; 1: The version of the ABI first used in G++ 3.2.
268;
e9e7c198 269; 2: The version of the ABI first used in G++ 3.4.
270;
82a16202 271; Additional positive integers will be assigned as new versions of
272; the ABI become the default version of the ABI.
e100aadc 273fabi-version=
2e9da478 274Common Joined UInteger Var(flag_abi_version) Init(2)
e100aadc 275
ecdb6d1a 276falign-functions
46f8e3b0 277Common Report Var(align_functions,0) Optimization UInteger
72528c71 278Align the start of functions
ecdb6d1a 279
941a4893 280falign-functions=
281Common RejectNegative Joined UInteger
282
ecdb6d1a 283falign-jumps
46f8e3b0 284Common Report Var(align_jumps,0) Optimization UInteger
72528c71 285Align labels which are only reached by jumping
ecdb6d1a 286
941a4893 287falign-jumps=
288Common RejectNegative Joined UInteger
289
ecdb6d1a 290falign-labels
46f8e3b0 291Common Report Var(align_labels,0) Optimization UInteger
72528c71 292Align all labels
ecdb6d1a 293
941a4893 294falign-labels=
295Common RejectNegative Joined UInteger
296
ecdb6d1a 297falign-loops
46f8e3b0 298Common Report Var(align_loops) Optimization UInteger
72528c71 299Align the start of loops
ecdb6d1a 300
941a4893 301falign-loops=
302Common RejectNegative Joined UInteger
303
82a16202 304; This flag is only tested if alias checking is enabled.
305; 0 if pointer arguments may alias each other. True in C.
306; 1 if pointer arguments may not alias each other but may alias
307; global variables.
308; 2 if pointer arguments may not alias each other and may not
5ff22aea 309; alias global variables.
310; 3 if pointer arguments may not alias anything. True in Fortran.
311; Set by the front end.
ecdb6d1a 312fargument-alias
87c75316 313Common Report Var(flag_argument_noalias,0) Optimization
72528c71 314Specify that arguments may alias each other and globals
ecdb6d1a 315
316fargument-noalias
87c75316 317Common Report Var(flag_argument_noalias,1) VarExists Optimization
72528c71 318Assume arguments may alias globals but not each other
ecdb6d1a 319
320fargument-noalias-global
87c75316 321Common Report Var(flag_argument_noalias,2) VarExists Optimization
72528c71 322Assume arguments alias neither each other nor globals
ecdb6d1a 323
5ff22aea 324fargument-noalias-anything
87c75316 325Common Report Var(flag_argument_noalias,3) VarExists Optimization
5ff22aea 326Assume arguments alias no other storage
327
ecdb6d1a 328fasynchronous-unwind-tables
87c75316 329Common Report Var(flag_asynchronous_unwind_tables) Optimization
72528c71 330Generate unwind tables that are exact at each instruction boundary
ecdb6d1a 331
3072d30e 332fauto-inc-dec
333Common Report Var(flag_auto_inc_dec) Init(1)
334Generate auto-inc/dec instructions
335
82a16202 336; -fcheck-bounds causes gcc to generate array bounds checks.
337; For C, C++ and ObjC: defaults off.
338; For Java: defaults to on.
339; For Fortran: defaults to off.
ecdb6d1a 340fbounds-check
2e9da478 341Common Report Var(flag_bounds_check)
72528c71 342Generate code to check bounds before indexing arrays
ecdb6d1a 343
344fbranch-count-reg
87c75316 345Common Report Var(flag_branch_on_count_reg) Init(1) Optimization
72528c71 346Replace add, compare, branch with branch on count register
ecdb6d1a 347
348fbranch-probabilities
87c75316 349Common Report Var(flag_branch_probabilities) Optimization
72528c71 350Use profiling information for branch probabilities
ecdb6d1a 351
1e06725a 352fbranch-target-load-optimize
87c75316 353Common Report Var(flag_branch_target_load_optimize) Optimization
72528c71 354Perform branch target load optimization before prologue / epilogue threading
1e06725a 355
356fbranch-target-load-optimize2
87c75316 357Common Report Var(flag_branch_target_load_optimize2) Optimization
72528c71 358Perform branch target load optimization after prologue / epilogue threading
1e06725a 359
08d163a9 360fbtr-bb-exclusive
87c75316 361Common Report Var(flag_btr_bb_exclusive) Optimization
08d163a9 362Restrict target load migration not to re-use registers in any basic block
363
941a4893 364fcall-saved-
365Common Joined RejectNegative
53b8e5c1 366-fcall-saved-<register> Mark <register> as being preserved across functions
941a4893 367
368fcall-used-
369Common Joined RejectNegative
53b8e5c1 370-fcall-used-<register> Mark <register> as being corrupted by function calls
941a4893 371
82a16202 372; Nonzero for -fcaller-saves: allocate values in regs that need to
373; be saved across function calls, if that produces overall better code.
374; Optional now, so people can test it.
1e06725a 375fcaller-saves
87c75316 376Common Report Var(flag_caller_saves) Optimization
72528c71 377Save registers around function calls
1e06725a 378
355572cc 379fcheck-data-deps
380Common Report Var(flag_check_data_deps)
381Compare the results of several data dependence analyzers.
382
ecdb6d1a 383fcommon
87c75316 384Common Report Var(flag_no_common,0) Optimization
72528c71 385Do not put uninitialized globals in the common section
ecdb6d1a 386
c231842d 387fconserve-stack
c45dd88a 388Common Var(flag_conserve_stack) Optimization
c231842d 389Do not perform optimizations increasing noticeably stack usage
390
ecdb6d1a 391fcprop-registers
87c75316 392Common Report Var(flag_cprop_registers) Optimization
72528c71 393Perform a register copy-propagation optimization pass
ecdb6d1a 394
1e06725a 395fcrossjumping
87c75316 396Common Report Var(flag_crossjumping) Optimization
72528c71 397Perform cross-jumping optimization
1e06725a 398
399fcse-follow-jumps
87c75316 400Common Report Var(flag_cse_follow_jumps) Optimization
72528c71 401When running CSE, follow jumps to their targets
1e06725a 402
403fcse-skip-blocks
87c75316 404Common Report Var(flag_cse_skip_blocks) Optimization
72528c71 405When running CSE, follow conditional jumps
1e06725a 406
45b9d334 407fcx-limited-range
87c75316 408Common Report Var(flag_cx_limited_range) Optimization
45b9d334 409Omit range reduction step when performing complex division
410
608256a0 411fcx-fortran-rules
412Common Report Var(flag_cx_fortran_rules) Optimization
413Complex multiplication and division follow Fortran rules
414
ecdb6d1a 415fdata-sections
87c75316 416Common Report Var(flag_data_sections) Optimization
72528c71 417Place data items into their own section
ecdb6d1a 418
d2153a46 419fdbg-cnt-list
420Common Report
421List all available debugging counters with their limits and counts.
422
3072d30e 423fdbg-cnt=
424Common RejectNegative Joined
d2153a46 425-fdbg-cnt=<counter>:<limit>[,<counter>:<limit>,...] Set the debug counter limit.
3072d30e 426
5f1f2de5 427fdebug-prefix-map=
428Common Joined RejectNegative
429Map one directory name to another in debug information
430
82a16202 431; Nonzero for -fdefer-pop: don't pop args after each function call
432; instead save them up to pop many calls' args with one insns.
1e06725a 433fdefer-pop
87c75316 434Common Report Var(flag_defer_pop) Optimization
72528c71 435Defer popping functions args from stack until later
1e06725a 436
437fdelayed-branch
87c75316 438Common Report Var(flag_delayed_branch) Optimization
72528c71 439Attempt to fill delay slots of branch instructions
1e06725a 440
441fdelete-null-pointer-checks
7df298fe 442Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization
72528c71 443Delete useless null pointer checks
1e06725a 444
445fdiagnostics-show-location=
446Common Joined RejectNegative
53b8e5c1 447-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics
1e06725a 448
efb9d9ee 449fdiagnostics-show-option
b0932b2f 450Common
3284a242 451Amend appropriate diagnostic messages with the command line option that controls them
efb9d9ee 452
4ee9c684 453fdump-
454Common Joined RejectNegative
455-fdump-<type> Dump various compiler internals to a file
456
969239ad 457fdump-noaddr
458Common Report Var(flag_dump_noaddr)
459Suppress output of addresses in debugging dumps
460
ecdb6d1a 461fdump-unnumbered
2e9da478 462Common Report Var(flag_dump_unnumbered) VarExists
969239ad 463Suppress output of instruction numbers, line number notes and addresses in debugging dumps
ecdb6d1a 464
fb39ff6e 465fdwarf2-cfi-asm
466Common Report Var(flag_dwarf2_cfi_asm) Init(HAVE_GAS_CFI_DIRECTIVE)
467Enable CFI tables via GAS assembler directives.
468
f1aa280c 469fearly-inlining
87c75316 470Common Report Var(flag_early_inlining) Init(1) Optimization
f1aa280c 471Perform early inlining
472
1e06725a 473feliminate-dwarf2-dups
2e9da478 474Common Report Var(flag_eliminate_dwarf2_dups)
72528c71 475Perform DWARF2 duplicate elimination
1e06725a 476
262444a6 477feliminate-unused-debug-symbols
2e9da478 478Common Report Var(flag_debug_only_used_symbols)
72528c71 479Perform unused type elimination in debug info
262444a6 480
1e06725a 481feliminate-unused-debug-types
2e9da478 482Common Report Var(flag_eliminate_unused_debug_types) Init(1)
72528c71 483Perform unused type elimination in debug info
1e06725a 484
0c573f98 485femit-class-debug-always
fd5e1dfe 486Common Report Var(flag_emit_class_debug_always) Init(0)
0c573f98 487Do not suppress C++ class debug information.
488
ecdb6d1a 489fexceptions
87c75316 490Common Report Var(flag_exceptions) Optimization
72528c71 491Enable exception handling
ecdb6d1a 492
1e06725a 493fexpensive-optimizations
87c75316 494Common Report Var(flag_expensive_optimizations) Optimization
72528c71 495Perform a number of minor, expensive optimizations
1e06725a 496
c6418a4e 497fexcess-precision=
498Common Joined RejectNegative
499-fexcess-precision=[fast|standard] Specify handling of excess floating-point precision
500
941a4893 501ffast-math
502Common
503
ecdb6d1a 504ffinite-math-only
87c75316 505Common Report Var(flag_finite_math_only) Optimization
72528c71 506Assume no NaNs or infinities are generated
ecdb6d1a 507
941a4893 508ffixed-
509Common Joined RejectNegative
53b8e5c1 510-ffixed-<register> Mark <register> as being unavailable to the compiler
941a4893 511
1e06725a 512ffloat-store
87c75316 513Common Report Var(flag_float_store) Optimization
82a16202 514Don't allocate floats and doubles in extended-precision registers
1e06725a 515
516fforce-addr
4d25f9eb 517Common
518Does nothing. Preserved for backward compatibility.
1e06725a 519
55d51835 520fforward-propagate
521Common Report Var(flag_forward_propagate) Optimization
42a3a38b 522Perform a forward propagation pass on RTL
523
82a16202 524; Nonzero means don't put addresses of constant functions in registers.
525; Used for compiling the Unix kernel, where strange substitutions are
526; done on the assembly output.
1e06725a 527ffunction-cse
2e9da478 528Common Report Var(flag_no_function_cse,0)
72528c71 529Allow function addresses to be held in registers
1e06725a 530
ecdb6d1a 531ffunction-sections
2e9da478 532Common Report Var(flag_function_sections)
72528c71 533Place each function into its own section
ecdb6d1a 534
1e06725a 535fgcse
87c75316 536Common Report Var(flag_gcse) Optimization
72528c71 537Perform global common subexpression elimination
1e06725a 538
539fgcse-lm
87c75316 540Common Report Var(flag_gcse_lm) Init(1) Optimization
72528c71 541Perform enhanced load motion during global common subexpression elimination
1e06725a 542
543fgcse-sm
87c75316 544Common Report Var(flag_gcse_sm) Init(0) Optimization
72528c71 545Perform store motion after global common subexpression elimination
1e06725a 546
5c47e414 547fgcse-las
87c75316 548Common Report Var(flag_gcse_las) Init(0) Optimization
839f8415 549Perform redundant load after store elimination in global common subexpression
550elimination
551
552fgcse-after-reload
87c75316 553Common Report Var(flag_gcse_after_reload) Optimization
839f8415 554Perform global common subexpression elimination after register allocation
3284a242 555has finished
5c47e414 556
d3399492 557; This option is not documented yet as its semantics will change.
255b6be7 558fgraphite
559Common Report Var(flag_graphite)
560Enable in and out of Graphite representation
561
562floop-strip-mine
563Common Report Var(flag_loop_strip_mine) Optimization
564Enable Loop Strip Mining transformation
565
566floop-interchange
567Common Report Var(flag_loop_interchange) Optimization
568Enable Loop Interchange transformation
569
570floop-block
571Common Report Var(flag_loop_block) Optimization
572Enable Loop Blocking transformation
573
d3399492 574; This option is not documented as it does not perform any useful optimization.
f4c4e2a2 575fgraphite-identity
576Common Report Var(flag_graphite_identity) Optimization
577Enable Graphite Identity transformation
578
ecdb6d1a 579fguess-branch-probability
87c75316 580Common Report Var(flag_guess_branch_prob) Optimization
72528c71 581Enable guessing of branch probabilities
ecdb6d1a 582
82a16202 583; Nonzero means ignore `#ident' directives. 0 means handle them.
584; Generate position-independent code for executables if possible
585; On SVR4 targets, it also controls whether or not to emit a
586; string identifying the compiler.
ecdb6d1a 587fident
2e9da478 588Common Report Var(flag_no_ident,0)
72528c71 589Process #ident directives
ecdb6d1a 590
1e06725a 591fif-conversion
87c75316 592Common Report Var(flag_if_conversion) Optimization
72528c71 593Perform conversion of conditional jumps to branchless equivalents
1e06725a 594
595fif-conversion2
87c75316 596Common Report Var(flag_if_conversion2) Optimization
72528c71 597Perform conversion of conditional jumps to conditional execution
1e06725a 598
82a16202 599; -finhibit-size-directive inhibits output of .size for ELF.
600; This is used only for compiling crtstuff.c,
601; and it may be extended to other effects
602; needed for crtstuff.c on other systems.
ecdb6d1a 603finhibit-size-directive
2e9da478 604Common Report Var(flag_inhibit_size_directive)
72528c71 605Do not generate .size directives
ecdb6d1a 606
f8daee9b 607findirect-inlining
608Common Report Var(flag_indirect_inlining)
609Perform indirect inlining
610
82a16202 611; Nonzero means that functions declared `inline' will be treated
612; as `static'. Prevents generation of zillions of copies of unused
613; static inline functions; instead, `inlines' are written out
614; only when actually used. Used in conjunction with -g. Also
615; does the right thing with #pragma interface.
1e06725a 616finline
1c2f0012 617Common Report Var(flag_no_inline,0) Init(0)
72528c71 618Pay attention to the \"inline\" keyword
1e06725a 619
b97510b2 620finline-small-functions
621Common Report Var(flag_inline_small_functions) Optimization
622Integrate simple functions into their callers when code size is known to not growth
623
1e06725a 624finline-functions
87c75316 625Common Report Var(flag_inline_functions) Optimization
72528c71 626Integrate simple functions into their callers
1e06725a 627
f1aa280c 628finline-functions-called-once
87c75316 629Common Report Var(flag_inline_functions_called_once) Init(1) Optimization
f1aa280c 630Integrate functions called once into their callers
9e0baf4d 631
39470ac3 632finline-limit-
633Common RejectNegative Joined UInteger
634
635finline-limit=
636Common RejectNegative Joined UInteger
53b8e5c1 637-finline-limit=<number> Limit the size of inlined functions to <number>
39470ac3 638
ecdb6d1a 639finstrument-functions
2e9da478 640Common Report Var(flag_instrument_function_entry_exit)
72528c71 641Instrument function entry and exit with profiling calls
ecdb6d1a 642
a95c0776 643finstrument-functions-exclude-function-list=
644Common RejectNegative Joined
645-finstrument-functions-exclude-function-list=name,... Do not instrument listed functions
646
647finstrument-functions-exclude-file-list=
648Common RejectNegative Joined
649-finstrument-functions-exclude-file-list=filename,... Do not instrument functions listed in files
650
a17a73c7 651fipa-cp
87c75316 652Common Report Var(flag_ipa_cp) Optimization
a17a73c7 653Perform Interprocedural constant propagation
654
2a15795f 655fipa-cp-clone
656Common Report Var(flag_ipa_cp_clone) Optimization
657Perform cloning to make Interprocedural constant propagation stronger
658
f7d118a9 659fipa-pure-const
87c75316 660Common Report Var(flag_ipa_pure_const) Init(0) Optimization
f7d118a9 661Discover pure and const functions
662
bdf4f142 663fipa-pta
87c75316 664Common Report Var(flag_ipa_pta) Init(0) Optimization
bdf4f142 665Perform interprocedural points-to analysis
666
f7d118a9 667fipa-reference
87c75316 668Common Report Var(flag_ipa_reference) Init(0) Optimization
f7d118a9 669Discover readonly and non addressable static variables
670
671fipa-type-escape
87c75316 672Common Report Var(flag_ipa_type_escape) Init(0) Optimization
f7d118a9 673Type based escape and alias analysis
674
604cde73 675fipa-matrix-reorg
76c71f34 676Common Report Var(flag_ipa_matrix_reorg) Optimization
604cde73 677Perform matrix layout flattening and transposing based
678on profiling information.
679
f27ac341 680fipa-struct-reorg
681Common Report Var(flag_ipa_struct_reorg)
682Perform structure layout optimizations based
683on profiling information.
684
47dd2e78 685fira-algorithm=
686Common Joined RejectNegative
14792f4e 687-fira-algorithm=[CB|priority] Set the used IRA algorithm
688
689fira-region=
690Common Joined RejectNegative
691-fira-region=[one|all|mixed] Set regions for IRA
47dd2e78 692
693fira-coalesce
694Common Report Var(flag_ira_coalesce) Init(0)
695Do optimistic coalescing.
696
697fira-share-save-slots
698Common Report Var(flag_ira_share_save_slots) Init(1)
699Share slots for saving different hard registers.
700
701fira-share-spill-slots
702Common Report Var(flag_ira_share_spill_slots) Init(1)
703Share stack slots for spilled pseudo-registers.
704
705fira-verbose=
706Common RejectNegative Joined UInteger
707-fira-verbose=<number> Control IRA's level of diagnostic messages.
708
dec41e98 709fivopts
87c75316 710Common Report Var(flag_ivopts) Init(1) Optimization
dec41e98 711Optimize induction variables on trees
712
51d8e657 713fjump-tables
87c75316 714Common Var(flag_jump_tables) Init(1) Optimization
51d8e657 715Use jump tables for sufficiently large switch statements
716
1e06725a 717fkeep-inline-functions
2e9da478 718Common Report Var(flag_keep_inline_functions)
72528c71 719Generate code for functions even if they are fully inlined
1e06725a 720
721fkeep-static-consts
2e9da478 722Common Report Var(flag_keep_static_consts) Init(1)
72528c71 723Emit static const variables even if they are not used
1e06725a 724
ecdb6d1a 725fleading-underscore
2e9da478 726Common Report Var(flag_leading_underscore) Init(-1)
72528c71 727Give external symbols a leading underscore
ecdb6d1a 728
4f87b914 729floop-optimize
730Common
334ec2d8 731Does nothing. Preserved for backward compatibility.
4f87b914 732
ecdb6d1a 733fmath-errno
46f8e3b0 734Common Report Var(flag_errno_math) Init(1) Optimization
72528c71 735Set errno after built-in math functions
ecdb6d1a 736
737fmem-report
2e9da478 738Common Report Var(mem_report)
72528c71 739Report on permanent memory allocation
ecdb6d1a 740
82a16202 741; This will attempt to merge constant section constants, if 1 only
742; string constants and constants from constant pool, if 2 also constant
743; variables.
ecdb6d1a 744fmerge-all-constants
87c75316 745Common Report Var(flag_merge_constants,2) Init(1) Optimization
72528c71 746Attempt to merge identical constants and constant variables
ecdb6d1a 747
748fmerge-constants
87c75316 749Common Report Var(flag_merge_constants,1) VarExists Optimization
72528c71 750Attempt to merge identical constants across compilation units
ecdb6d1a 751
7765591b 752fmerge-debug-strings
753Common Report Var(flag_merge_debug_strings) Init(1)
754Attempt to merge identical debug strings across compilation units
755
1e06725a 756fmessage-length=
757Common RejectNegative Joined UInteger
53b8e5c1 758-fmessage-length=<number> Limit diagnostics to <number> characters per line. 0 suppresses line-wrapping
1e06725a 759
406a73e7 760fmodulo-sched
87c75316 761Common Report Var(flag_modulo_sched) Optimization
406a73e7 762Perform SMS based modulo scheduling before the first scheduling pass
763
3a943084 764fmodulo-sched-allow-regmoves
765Common Report Var(flag_modulo_sched_allow_regmoves)
766Perform SMS based modulo scheduling with register moves allowed
767
3a0ecac2 768fmove-loop-invariants
87c75316 769Common Report Var(flag_move_loop_invariants) Init(1) Optimization
3a0ecac2 770Move loop invariant computations out of loops
771
4ee9c684 772fmudflap
2e9da478 773Common RejectNegative Report Var(flag_mudflap)
3284a242 774Add mudflap bounds-checking instrumentation for single-threaded program
4ee9c684 775
776fmudflapth
c1d36cca 777Common RejectNegative Report VarExists Var(flag_mudflap,2)
3284a242 778Add mudflap bounds-checking instrumentation for multi-threaded program
4ee9c684 779
780fmudflapir
2e9da478 781Common RejectNegative Report Var(flag_mudflap_ignore_reads)
3284a242 782Ignore read operations when inserting mudflap instrumentation
4ee9c684 783
3072d30e 784fdce
76c71f34 785Common Var(flag_dce) Init(1) Optimization
3072d30e 786Use the RTL dead code elimination pass
787
788fdse
76c71f34 789Common Var(flag_dse) Init(1) Optimization
3072d30e 790Use the RTL dead store elimination pass
791
f045d41d 792freschedule-modulo-scheduled-loops
87c75316 793Common Report Var(flag_resched_modulo_sched) Optimization
f045d41d 794Enable/Disable the traditional scheduling in loops that already passed modulo scheduling
795
ecdb6d1a 796fnon-call-exceptions
87c75316 797Common Report Var(flag_non_call_exceptions) Optimization
72528c71 798Support synchronous non-call exceptions
ecdb6d1a 799
1e06725a 800fomit-frame-pointer
87c75316 801Common Report Var(flag_omit_frame_pointer) Optimization
72528c71 802When possible do not generate stack frames
1e06725a 803
ecdb6d1a 804foptimize-register-move
87c75316 805Common Report Var(flag_regmove) Optimization
72528c71 806Do the full register move optimization pass
ecdb6d1a 807
1e06725a 808foptimize-sibling-calls
87c75316 809Common Report Var(flag_optimize_sibling_calls) Optimization
72528c71 810Optimize sibling and tail recursive calls
1e06725a 811
51949610 812fpre-ipa-mem-report
813Common Report Var(pre_ipa_mem_report)
814Report on memory allocation before interprocedural optimization
815
816fpost-ipa-mem-report
817Common Report Var(post_ipa_mem_report)
818Report on memory allocation before interprocedural optimization
819
ecdb6d1a 820fpack-struct
87c75316 821Common Report Var(flag_pack_struct) Optimization
72528c71 822Pack structure members together without holes
ecdb6d1a 823
6b5553e5 824fpack-struct=
87c75316 825Common RejectNegative Joined UInteger Optimization
6b5553e5 826-fpack-struct=<number> Set initial maximum structure member alignment
827
1e06725a 828fpcc-struct-return
2e9da478 829Common Report Var(flag_pcc_struct_return,1) VarExists
72528c71 830Return small aggregates in memory, not registers
1e06725a 831
832fpeel-loops
87c75316 833Common Report Var(flag_peel_loops) Optimization
72528c71 834Perform loop peeling
1e06725a 835
836fpeephole
87c75316 837Common Report Var(flag_no_peephole,0) Optimization
72528c71 838Enable machine specific peephole optimizations
1e06725a 839
ecdb6d1a 840fpeephole2
87c75316 841Common Report Var(flag_peephole2) Optimization
72528c71 842Enable an RTL peephole pass before sched2
ecdb6d1a 843
82a16202 844fPIC
845Common Report Var(flag_pic,2)
846Generate position-independent code if possible (large mode)
847
848fPIE
849Common Report Var(flag_pie,2)
850Generate position-independent code for executables if possible (large mode)
851
ecdb6d1a 852fpic
2e9da478 853Common Report Var(flag_pic,1) VarExists
82a16202 854Generate position-independent code if possible (small mode)
ecdb6d1a 855
856fpie
2e9da478 857Common Report Var(flag_pie,1) VarExists
82a16202 858Generate position-independent code for executables if possible (small mode)
ecdb6d1a 859
9227b6fc 860fplugin=
861Common Joined RejectNegative
862Specify a plugin to load
863
864fplugin-arg-
865Common Joined RejectNegative
866-fplugin-arg-<name>-<key>[=<value>] Specify argument <key>=<value> for plugin <name>
867
ad4a85ad 868fpredictive-commoning
76c71f34 869Common Report Var(flag_predictive_commoning) Optimization
ad4a85ad 870Run predictive commoning optimization.
871
1e06725a 872fprefetch-loop-arrays
87c75316 873Common Report Var(flag_prefetch_loop_arrays) Optimization
72528c71 874Generate prefetch instructions, if available, for arrays in loops
1e06725a 875
ecdb6d1a 876fprofile
2e9da478 877Common Report Var(profile_flag)
72528c71 878Enable basic program profiling code
ecdb6d1a 879
880fprofile-arcs
2e9da478 881Common Report Var(profile_arc_flag)
72528c71 882Insert arc-based program profiling code
ecdb6d1a 883
3e3a0e9c 884fprofile-dir=
885Common Joined RejectNegative
886Set the top-level directory for storing the profile data.
887The default is 'pwd'.
888
e0dc6f2b 889fprofile-correction
890Common Report Var(flag_profile_correction)
891Enable correction of flow inconsistent profile data input
892
7dea76ba 893fprofile-generate
894Common
895Enable common options for generating profile info for profile feedback directed optimizations
896
3e3a0e9c 897fprofile-generate=
898Common Joined RejectNegative
899Enable common options for generating profile info for profile feedback directed optimizations, and set -fprofile-dir=
900
7dea76ba 901fprofile-use
3e3a0e9c 902Common Var(flag_profile_use)
7dea76ba 903Enable common options for performing profile feedback directed optimizations
904
3e3a0e9c 905fprofile-use=
906Common Joined RejectNegative
907Enable common options for performing profile feedback directed optimizations, and set -fprofile-dir=
908
1c6a7b8c 909fprofile-values
2e9da478 910Common Report Var(flag_profile_values)
1c6a7b8c 911Insert code to profile values of expressions
912
1e06725a 913frandom-seed
914Common
915
916frandom-seed=
917Common Joined RejectNegative
53b8e5c1 918-frandom-seed=<string> Make compile reproducible using <string>
1e06725a 919
7c6733e8 920; This switch causes the command line that was used to create an
921; object file to be recorded into the object file. The exact format
922; of this recording is target and binary file format dependent.
923; It is related to the -fverbose-asm switch, but that switch only
924; records information in the assembler output file as comments, so
925; they never reach the object file.
926frecord-gcc-switches
927Common Report Var(flag_record_gcc_switches)
928Record gcc command line switches in the object file.
929
1e06725a 930freg-struct-return
87c75316 931Common Report Var(flag_pcc_struct_return,0) VarExists Optimization
72528c71 932Return small aggregates in registers
1e06725a 933
ecdb6d1a 934fregmove
87c75316 935Common Report Var(flag_regmove) Optimization
72528c71 936Enables a register move optimization
ecdb6d1a 937
938frename-registers
87c75316 939Common Report Var(flag_rename_registers) Init(2) Optimization
72528c71 940Perform a register renaming optimization pass
ecdb6d1a 941
942freorder-blocks
87c75316 943Common Report Var(flag_reorder_blocks) Optimization
72528c71 944Reorder basic blocks to improve code placement
ecdb6d1a 945
4f18499c 946freorder-blocks-and-partition
87c75316 947Common Report Var(flag_reorder_blocks_and_partition) Optimization
4f18499c 948Reorder basic blocks and partition into hot and cold sections
949
ecdb6d1a 950freorder-functions
87c75316 951Common Report Var(flag_reorder_functions) Optimization
72528c71 952Reorder functions to improve code placement
ecdb6d1a 953
1e06725a 954frerun-cse-after-loop
87c75316 955Common Report Var(flag_rerun_cse_after_loop) Init(2) Optimization
72528c71 956Add a common subexpression elimination pass after loop optimizations
1e06725a 957
4f87b914 958frerun-loop-opt
959Common
334ec2d8 960Does nothing. Preserved for backward compatibility.
4f87b914 961
5466f589 962frounding-math
87c75316 963Common Report Var(flag_rounding_math) Optimization
5466f589 964Disable optimizations that assume default FP rounding behavior
965
ecdb6d1a 966fsched-interblock
87c75316 967Common Report Var(flag_schedule_interblock) Init(1) Optimization
72528c71 968Enable scheduling across basic blocks
ecdb6d1a 969
970fsched-spec
87c75316 971Common Report Var(flag_schedule_speculative) Init(1) Optimization
72528c71 972Allow speculative motion of non-loads
ecdb6d1a 973
974fsched-spec-load
87c75316 975Common Report Var(flag_schedule_speculative_load) Optimization
72528c71 976Allow speculative motion of some loads
ecdb6d1a 977
978fsched-spec-load-dangerous
87c75316 979Common Report Var(flag_schedule_speculative_load_dangerous) Optimization
72528c71 980Allow speculative motion of more loads
ecdb6d1a 981
1e06725a 982fsched-verbose=
983Common RejectNegative Joined
53b8e5c1 984-fsched-verbose=<number> Set the verbosity level of the scheduler
1e06725a 985
ecdb6d1a 986fsched2-use-superblocks
87c75316 987Common Report Var(flag_sched2_use_superblocks) Optimization
72528c71 988If scheduling post reload, do superblock scheduling
ecdb6d1a 989
990fsched2-use-traces
87c75316 991Common Report Var(flag_sched2_use_traces) Optimization
72528c71 992If scheduling post reload, do trace scheduling
ecdb6d1a 993
1e06725a 994fschedule-insns
87c75316 995Common Report Var(flag_schedule_insns) Optimization
72528c71 996Reschedule instructions before register allocation
1e06725a 997
998fschedule-insns2
87c75316 999Common Report Var(flag_schedule_insns_after_reload) Optimization
72528c71 1000Reschedule instructions after register allocation
1e06725a 1001
e1ab7874 1002; This flag should be on when a target implements non-trivial
1003; scheduling hooks, maybe saving some information for its own sake.
1004; On IA64, for example, this is used for correct bundling.
1005fselective-scheduling
1006Common Report Var(flag_selective_scheduling) Optimization
1007Schedule instructions using selective scheduling algorithm
1008
1009fselective-scheduling2
1010Common Report Var(flag_selective_scheduling2) Optimization
1011Run selective scheduling after reload
1012
1013fsel-sched-pipelining
1014Common Report Var(flag_sel_sched_pipelining) Init(0) Optimization
1015Perform software pipelining of inner loops during selective scheduling
1016
1017fsel-sched-pipelining-outer-loops
1018Common Report Var(flag_sel_sched_pipelining_outer_loops) Init(0) Optimization
1019Perform software pipelining of outer loops during selective scheduling
1020
1021fsel-sched-reschedule-pipelined
1022Common Report Var(flag_sel_sched_reschedule_pipelined) Init(0) Optimization
1023Reschedule pipelined regions without pipelining
1024
82a16202 1025; sched_stalled_insns means that insns can be moved prematurely from the queue
1026; of stalled insns into the ready list.
52c4b43f 1027fsched-stalled-insns
46f8e3b0 1028Common Report Var(flag_sched_stalled_insns) Optimization UInteger
52c4b43f 1029Allow premature scheduling of queued insns
1030
1031fsched-stalled-insns=
a0c938f0 1032Common RejectNegative Joined UInteger
98b93ebb 1033-fsched-stalled-insns=<number> Set number of queued insns that can be prematurely scheduled
52c4b43f 1034
82a16202 1035; sched_stalled_insns_dep controls how many recently scheduled cycles will
1036; be examined for a dependency on a stalled insn that is candidate for
1037; premature removal from the queue of stalled insns into the ready list (has
1038; an effect only if the flag 'sched_stalled_insns' is set).
52c4b43f 1039fsched-stalled-insns-dep
46f8e3b0 1040Common Report Var(flag_sched_stalled_insns_dep,1) Init(1) Optimization UInteger
52c4b43f 1041Set dependence distance checking in premature scheduling of queued insns
1042
1043fsched-stalled-insns-dep=
1044Common RejectNegative Joined UInteger
98b93ebb 1045-fsched-stalled-insns-dep=<number> Set dependence distance checking in premature scheduling of queued insns
52c4b43f 1046
f2d0e9f1 1047fsection-anchors
87c75316 1048Common Report Var(flag_section_anchors) Optimization
f2d0e9f1 1049Access data in the same section from shared anchor points
1050
2b74c150 1051fsee
1052Common Report Var(flag_see) Init(0)
1053Eliminate redundant sign extensions using LCM.
1054
5fd4bf3b 1055fshow-column
3df4c876 1056Common C ObjC C++ ObjC++ Report Var(flag_show_column) Init(0)
1057Show column numbers in diagnostics, when available. Default off
5fd4bf3b 1058
ecdb6d1a 1059fsignaling-nans
87c75316 1060Common Report Var(flag_signaling_nans) Optimization
72528c71 1061Disable optimizations observable by IEEE signaling NaNs
ecdb6d1a 1062
893038cd 1063fsigned-zeros
e8831472 1064Common Report Var(flag_signed_zeros) Init(1) Optimization
893038cd 1065Disable floating point optimizations that ignore the IEEE signedness of zero
1066
ecdb6d1a 1067fsingle-precision-constant
87c75316 1068Common Report Var(flag_single_precision_constant) Optimization
72528c71 1069Convert floating point constants to single precision constants
ecdb6d1a 1070
a9989fb4 1071fsplit-ivs-in-unroller
87c75316 1072Common Report Var(flag_split_ivs_in_unroller) Init(1) Optimization
3284a242 1073Split lifetimes of induction variables when loops are unrolled
a9989fb4 1074
1a6a0f2a 1075fsplit-wide-types
e8831472 1076Common Report Var(flag_split_wide_types) Optimization
1a6a0f2a 1077Split wide types into independent registers
1078
375bb675 1079fvariable-expansion-in-unroller
87c75316 1080Common Report Var(flag_variable_expansion_in_unroller) Optimization
3284a242 1081Apply variable expansion when loops are unrolled
375bb675 1082
4852b829 1083fstack-check=
1084Common Report RejectNegative Joined
1085-fstack-check=[no|generic|specific] Insert stack checking code into the program
1086
ecdb6d1a 1087fstack-check
4852b829 1088Common Report
1089Insert stack checking code into the program. Same as -fstack-check=specific
ecdb6d1a 1090
1e06725a 1091fstack-limit
1092Common
1093
941a4893 1094fstack-limit-register=
1095Common RejectNegative Joined
53b8e5c1 1096-fstack-limit-register=<register> Trap if the stack goes past <register>
941a4893 1097
1098fstack-limit-symbol=
1099Common RejectNegative Joined
53b8e5c1 1100-fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>
941a4893 1101
f1a0edff 1102fstack-protector
1103Common Report Var(flag_stack_protect, 1)
1104Use propolice as a stack protection method
1105
1106fstack-protector-all
1107Common Report RejectNegative Var(flag_stack_protect, 2) VarExists
1108Use a stack protection method for every function
1109
1e06725a 1110fstrength-reduce
4f87b914 1111Common
334ec2d8 1112Does nothing. Preserved for backward compatibility.
1e06725a 1113
82a16202 1114; Nonzero if we should do (language-dependent) alias analysis.
1115; Typically, this analysis will assume that expressions of certain
1116; types do not alias expressions of certain other types. Only used
1117; if alias analysis (in general) is enabled.
ecdb6d1a 1118fstrict-aliasing
87c75316 1119Common Report Var(flag_strict_aliasing) Optimization
72528c71 1120Assume strict aliasing rules apply
ecdb6d1a 1121
981eb798 1122fstrict-overflow
1123Common Report Var(flag_strict_overflow)
1124Treat signed overflow as undefined
1125
1e06725a 1126fsyntax-only
2e9da478 1127Common Report Var(flag_syntax_only)
72528c71 1128Check for syntax errors, then stop
1e06725a 1129
ecdb6d1a 1130ftest-coverage
2e9da478 1131Common Report Var(flag_test_coverage)
72528c71 1132Create data files needed by \"gcov\"
ecdb6d1a 1133
1e06725a 1134fthread-jumps
87c75316 1135Common Report Var(flag_thread_jumps) Optimization
72528c71 1136Perform jump threading optimizations
1e06725a 1137
ecdb6d1a 1138ftime-report
2e9da478 1139Common Report Var(time_report)
72528c71 1140Report the time taken by each compiler pass
ecdb6d1a 1141
941a4893 1142ftls-model=
1143Common Joined RejectNegative
53b8e5c1 1144-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec] Set the default thread-local storage code generation model
941a4893 1145
56af936e 1146ftoplevel-reorder
8188ae06 1147Common Report Var(flag_toplevel_reorder) Init(2) Optimization
56af936e 1148Reorder top level functions, variables, and asms
1149
1e06725a 1150ftracer
2e9da478 1151Common Report Var(flag_tracer)
72528c71 1152Perform superblock formation via tail duplication
1e06725a 1153
82a16202 1154; Zero means that floating-point math operations cannot generate a
1155; (user-visible) trap. This is the case, for example, in nonstop
1156; IEEE 754 arithmetic.
ecdb6d1a 1157ftrapping-math
87c75316 1158Common Report Var(flag_trapping_math) Init(1) Optimization
72528c71 1159Assume floating-point operations can trap
ecdb6d1a 1160
1161ftrapv
87c75316 1162Common Report Var(flag_trapv) Optimization
72528c71 1163Trap for signed overflow in addition, subtraction and multiplication
ecdb6d1a 1164
4ee9c684 1165ftree-ccp
87c75316 1166Common Report Var(flag_tree_ccp) Optimization
4ee9c684 1167Enable SSA-CCP optimization on trees
1168
88dbf20f 1169ftree-store-ccp
61207d43 1170Common
1171Does nothing. Preserved for backward compatibility.
88dbf20f 1172
4ee9c684 1173ftree-ch
87c75316 1174Common Report Var(flag_tree_ch) Optimization
4ee9c684 1175Enable loop header copying on trees
1176
4ee9c684 1177ftree-copyrename
87c75316 1178Common Report Var(flag_tree_copyrename) Optimization
3284a242 1179Replace SSA temporaries with better names in copies
4ee9c684 1180
88dbf20f 1181ftree-copy-prop
87c75316 1182Common Report Var(flag_tree_copy_prop) Optimization
88dbf20f 1183Enable copy propagation on trees
1184
1185ftree-store-copy-prop
317d3b82 1186Common
578ef723 1187Does nothing. Preserved for backward compatibility.
88dbf20f 1188
e6d0e152 1189ftree-cselim
1190Common Report Var(flag_tree_cselim) Init(2) Optimization
1191Transform condition stores into unconditional ones
1192
a347af29 1193ftree-switch-conversion
1194Common Report Var(flag_tree_switch_conversion) Optimization
1195Perform conversions of switch initializations.
1196
4ee9c684 1197ftree-dce
87c75316 1198Common Report Var(flag_tree_dce) Optimization
4ee9c684 1199Enable SSA dead code elimination optimization on trees
1200
1201ftree-dominator-opts
87c75316 1202Common Report Var(flag_tree_dom) Optimization
4ee9c684 1203Enable dominator optimizations
1204
1205ftree-dse
87c75316 1206Common Report Var(flag_tree_dse) Optimization
4ee9c684 1207Enable dead store elimination
1208
591c2a30 1209ftree-fre
87c75316 1210Common Report Var(flag_tree_fre) Optimization
591c2a30 1211Enable Full Redundancy Elimination (FRE) on trees
1212
801c5610 1213ftree-loop-distribution
2b945500 1214Common Report Var(flag_tree_loop_distribution) Optimization
801c5610 1215Enable loop distribution on trees
1216
41b5cc78 1217ftree-loop-im
87c75316 1218Common Report Var(flag_tree_loop_im) Init(1) Optimization
7d23383d 1219Enable loop invariant motion on trees
1220
60cfcb79 1221ftree-loop-linear
87c75316 1222Common Report Var(flag_tree_loop_linear) Optimization
60cfcb79 1223Enable linear loop transforms on trees
1224
41b5cc78 1225ftree-loop-ivcanon
87c75316 1226Common Report Var(flag_tree_loop_ivcanon) Init(1) Optimization
41b5cc78 1227Create canonical induction variables in loops
1228
dcb9eccb 1229ftree-loop-optimize
87c75316 1230Common Report Var(flag_tree_loop_optimize) Init(1) Optimization
dcb9eccb 1231Enable loop optimizations on tree level
1232
28c92cbb 1233ftree-parallelize-loops=
1234Common Report Joined UInteger Var(flag_tree_parallelize_loops) Init(1)
1235Enable automatic parallelization of loops
1236
4ee9c684 1237ftree-pre
87c75316 1238Common Report Var(flag_tree_pre) Optimization
4ee9c684 1239Enable SSA-PRE optimization on trees
1240
621a93b1 1241ftree-reassoc
1242Common Report Var(flag_tree_reassoc) Init(1) Optimization
1243Enable reassociation on tree level
1244
2be14d8b 1245ftree-salias
70393469 1246Common
1247Does nothing. Preserved for backward compatibility.
2be14d8b 1248
5e733b02 1249ftree-sink
87c75316 1250Common Report Var(flag_tree_sink) Optimization
5e733b02 1251Enable SSA code sinking on trees
1252
4ee9c684 1253ftree-sra
87c75316 1254Common Report Var(flag_tree_sra) Optimization
4ee9c684 1255Perform scalar replacement of aggregates
1256
1257ftree-ter
bff4202c 1258Common Report Var(flag_tree_ter) Init(1) Optimization
4ee9c684 1259Replace temporary expressions in the SSA->normal pass
1260
87c75316 1261ftree-lrs
1262Common Report Var(flag_tree_live_range_split) Optimization
1263Perform live range splitting during the SSA->normal pass
1264
88dbf20f 1265ftree-vrp
87c75316 1266Common Report Var(flag_tree_vrp) Init(0) Optimization
88dbf20f 1267Perform Value Range Propagation on trees
1268
1e06725a 1269funit-at-a-time
8188ae06 1270Common Report Var(flag_unit_at_a_time) Init(1) Optimization
72528c71 1271Compile whole compilation unit at a time
1e06725a 1272
1273funroll-loops
87c75316 1274Common Report Var(flag_unroll_loops) Optimization
72528c71 1275Perform loop unrolling when iteration count is known
1e06725a 1276
1277funroll-all-loops
87c75316 1278Common Report Var(flag_unroll_all_loops) Optimization
72528c71 1279Perform loop unrolling for all loops
1e06725a 1280
7e3cc681 1281; Nonzero means that loop optimizer may assume that the induction variables
1282; that control loops do not overflow and that the loops with nontrivial
1283; exit condition are not infinite
1284funsafe-loop-optimizations
87c75316 1285Common Report Var(flag_unsafe_loop_optimizations) Optimization
7e3cc681 1286Allow loop optimizations to assume that the loops behave in normal way
1287
49d060d7 1288fassociative-math
1289Common Report Var(flag_associative_math)
1290Allow optimization for floating-point arithmetic which may change the
1291result of the operation due to rounding.
1292
1293freciprocal-math
1294Common Report Var(flag_reciprocal_math)
1295Same as -fassociative-math for expressions which include division.
1296
82a16202 1297; Nonzero means that unsafe floating-point math optimizations are allowed
1298; for the sake of speed. IEEE compliance is not guaranteed, and operations
1299; are allowed to assume that their arguments and results are "normal"
1300; (e.g., nonnegative for SQRT).
ecdb6d1a 1301funsafe-math-optimizations
87c75316 1302Common Report Var(flag_unsafe_math_optimizations) Optimization
72528c71 1303Allow math optimizations that may violate IEEE or ISO standards
ecdb6d1a 1304
1e06725a 1305funswitch-loops
87c75316 1306Common Report Var(flag_unswitch_loops) Optimization
72528c71 1307Perform loop unswitching
1e06725a 1308
ecdb6d1a 1309funwind-tables
87c75316 1310Common Report Var(flag_unwind_tables) Optimization
72528c71 1311Just generate unwind tables for exception handling
ecdb6d1a 1312
5923a5e7 1313fvar-tracking
87c75316 1314Common Report Var(flag_var_tracking) VarExists Optimization
5923a5e7 1315Perform variable tracking
1316
d53bb226 1317fvar-tracking-uninit
1318Common Report Var(flag_var_tracking_uninit) Optimization
1319Perform variable tracking and also tag variables that are uninitialized
1320
c91e8223 1321ftree-vectorize
87c75316 1322Common Report Var(flag_tree_vectorize) Optimization
c91e8223 1323Enable loop vectorization on trees
1324
867c03eb 1325fvect-cost-model
1326Common Report Var(flag_vect_cost_model) Optimization
1327Enable use of cost model in vectorization
1328
25e3c2e8 1329ftree-vect-loop-version
87c75316 1330Common Report Var(flag_tree_vect_loop_version) Init(1) Optimization
25e3c2e8 1331Enable loop versioning when doing loop vectorization on trees
1332
459e8543 1333ftree-vectorizer-verbose=
1334Common RejectNegative Joined
98b93ebb 1335-ftree-vectorizer-verbose=<number> Set the verbosity level of the vectorizer
459e8543 1336
2a6e95ba 1337ftree-scev-cprop
e8831472 1338Common Report Var(flag_tree_scev_cprop) Init(1) Optimization
2a6e95ba 1339Enable copy propagation of scalar-evolution information.
1340
82a16202 1341; -fverbose-asm causes extra commentary information to be produced in
1342; the generated assembly code (to make it more readable). This option
1343; is generally only of use to those who actually need to read the
1344; generated assembly code (perhaps while debugging the compiler itself).
1345; -fno-verbose-asm, the default, causes the extra information
1346; to not be added and is useful when comparing two assembler files.
ecdb6d1a 1347fverbose-asm
2e9da478 1348Common Report Var(flag_verbose_asm)
72528c71 1349Add extra commentary to assembler output
ecdb6d1a 1350
b212f378 1351fvisibility=
1352Common Joined RejectNegative
1353-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility
1354
1355
1c6a7b8c 1356fvpt
87c75316 1357Common Report Var(flag_value_profile_transformations) Optimization
1c6a7b8c 1358Use expression value profiles in optimizations
1359
eeb4a70e 1360fweb
87c75316 1361Common Report Var(flag_web) Init(2) Optimization
eeb4a70e 1362Construct webs and split unrelated uses of single variable
1363
e6a23add 1364ftree-builtin-call-dce
1365Common Report Var(flag_tree_builtin_call_dce) Init(0) Optimization
1366Enable conditional dead code elimination for builtin calls
1367
62eec3b4 1368fwhole-program
87c75316 1369Common Report Var(flag_whole_program) Init(0) Optimization
62eec3b4 1370Perform whole program optimizations
1371
ecdb6d1a 1372fwrapv
87c75316 1373Common Report Var(flag_wrapv) Optimization
72528c71 1374Assume signed arithmetic overflow wraps around
ecdb6d1a 1375
ecdb6d1a 1376fzero-initialized-in-bss
2e9da478 1377Common Report Var(flag_zero_initialized_in_bss) Init(1)
72528c71 1378Put zero initialized data in the bss section
ecdb6d1a 1379
6f2f567f 1380g
1381Common JoinedOrMissing
b0e56fb1 1382Generate debug information in default format
1383
1384gcoff
a1baa5f1 1385Common JoinedOrMissing Negative(gdwarf-2)
b0e56fb1 1386Generate debug information in COFF format
1387
b0e56fb1 1388gdwarf-2
a1baa5f1 1389Common JoinedOrMissing Negative(gstabs)
b0e56fb1 1390Generate debug information in DWARF v2 format
1391
1392ggdb
1393Common JoinedOrMissing
1394Generate debug information in default extended format
1395
1396gstabs
a1baa5f1 1397Common JoinedOrMissing Negative(gstabs+)
b0e56fb1 1398Generate debug information in STABS format
1399
1400gstabs+
a1baa5f1 1401Common JoinedOrMissing Negative(gvms)
b0e56fb1 1402Generate debug information in extended STABS format
1403
1404gvms
a1baa5f1 1405Common JoinedOrMissing Negative(gxcoff)
b0e56fb1 1406Generate debug information in VMS format
1407
1408gxcoff
a1baa5f1 1409Common JoinedOrMissing Negative(gxcoff+)
b0e56fb1 1410Generate debug information in XCOFF format
1411
1412gxcoff+
a1baa5f1 1413Common JoinedOrMissing Negative(gcoff)
b0e56fb1 1414Generate debug information in extended XCOFF format
6f2f567f 1415
e690b385 1416o
1417Common Joined Separate
53b8e5c1 1418-o <file> Place output into <file>
e690b385 1419
1420p
2e9da478 1421Common Var(profile_flag)
53b8e5c1 1422Enable function profiling
e690b385 1423
1424pedantic
2e9da478 1425Common Var(pedantic)
53b8e5c1 1426Issue warnings needed for strict compliance to the standard
e690b385 1427
1428pedantic-errors
1429Common
53b8e5c1 1430Like -pedantic but issue them as errors
e690b385 1431
3272db82 1432quiet
2e9da478 1433Common Var(quiet_flag)
53b8e5c1 1434Do not display functions compiled or elapsed time
3272db82 1435
e690b385 1436version
2e9da478 1437Common Var(version_flag)
53b8e5c1 1438Display the compiler's version
e690b385 1439
1440w
2e9da478 1441Common Var(inhibit_warnings)
53b8e5c1 1442Suppress warnings
e690b385 1443
794febf8 1444shared
1445Common RejectNegative Negative(pie)
1446Create a shared library
1447
1448pie
1449Common RejectNegative Negative(shared)
1450Create a position independent executable
1451
3272db82 1452; This comment is to ensure we retain the blank line above.