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