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