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