]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/common.opt
* lcm.c: Move all mode-switching related functions from here...
[thirdparty/gcc.git] / gcc / common.opt
CommitLineData
3272db82 1; Options for the language- and target-independent parts of the compiler.
2e9da478 2
fee1d116 3; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
3272db82 4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
9; Software Foundation; either version 2, or (at your option) any later
10; version.
11;
12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15; for more details.
16;
17; You should have received a copy of the GNU General Public License
18; along with GCC; see the file COPYING. If not, write to the Free
19; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20; 02111-1307, USA.
21
5fd4bf3b 22; See the GCC internals manual 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
da3b1bab 30-param
31Common Separate
29fed0db 32--param <param>=<value> Set parameter <param> to value. See below for a complete list of parameters
da3b1bab 33
e690b385 34-target-help
35Common
36
37-version
38Common
39
40G
837277ab 41Common Joined Separate UInteger
53b8e5c1 42-G<number> Put global and static data smaller than <number> bytes into a special section (on some targets)
e690b385 43
da3b1bab 44O
45Common JoinedOrMissing
53b8e5c1 46-O<number> Set optimization level to <number>
da3b1bab 47
48Os
49Common
53b8e5c1 50Optimize for space rather than speed
da3b1bab 51
52W
53Common RejectNegative
bb0814ce 54This switch is deprecated; use -Wextra instead
da3b1bab 55
6f2f567f 56Waggregate-return
2e9da478 57Common Var(warn_aggregate_return)
bb0814ce 58Warn about returning structures, unions or arrays
6f2f567f 59
9b2d6d13 60Wattributes
61Common Var(warn_attributes) Init(1)
62Warn about inappropriate attribute usage
63
6f2f567f 64Wcast-align
2e9da478 65Common Var(warn_cast_align)
bb0814ce 66Warn about pointer casts which increase alignment
6f2f567f 67
68Wdeprecated-declarations
2e9da478 69Common Var(warn_deprecated_decl) Init(1)
bb0814ce 70Warn about uses of __attribute__((deprecated)) declarations
6f2f567f 71
72Wdisabled-optimization
2e9da478 73Common Var(warn_disabled_optimization)
bb0814ce 74Warn when an optimization pass is disabled
6f2f567f 75
76Werror
2e9da478 77Common Var(warnings_are_errors)
bb0814ce 78Treat all warnings as errors
6f2f567f 79
da3b1bab 80Wextra
81Common
53b8e5c1 82Print extra (possibly unwanted) warnings
da3b1bab 83
295acf4f 84Wfatal-errors
2e9da478 85Common Var(flag_fatal_errors)
295acf4f 86Exit on the first error occurred
87
6f2f567f 88Winline
2e9da478 89Common Var(warn_inline)
bb0814ce 90Warn when an inlined function cannot be inlined
6f2f567f 91
92Wlarger-than-
93Common RejectNegative Joined UInteger
53b8e5c1 94-Wlarger-than-<number> Warn if an object is larger than <number> bytes
6f2f567f 95
96Wmissing-noreturn
2e9da478 97Common Var(warn_missing_noreturn)
bb0814ce 98Warn about functions which might be candidates for __attribute__((noreturn))
6f2f567f 99
100Wpacked
2e9da478 101Common Var(warn_packed)
bb0814ce 102Warn when the packed attribute has no effect on struct layout
6f2f567f 103
104Wpadded
2e9da478 105Common Var(warn_padded)
bb0814ce 106Warn when padding is required to align structure members
6f2f567f 107
108Wshadow
2e9da478 109Common Var(warn_shadow)
bb0814ce 110Warn when one local variable shadows another
6f2f567f 111
112Wstrict-aliasing
113Common
bb0814ce 114Warn about code which might break strict aliasing rules
6f2f567f 115
c1628b55 116Wstrict-aliasing=
117Common Joined UInteger
118Warn about code which might break strict aliasing rules
119
6f2f567f 120Wswitch
2e9da478 121Common Var(warn_switch)
bb0814ce 122Warn about enumerated switches, with no default, missing a case
6f2f567f 123
124Wswitch-default
2e9da478 125Common Var(warn_switch_default)
bb0814ce 126Warn about enumerated switches missing a \"default:\" statement
6f2f567f 127
128Wswitch-enum
2e9da478 129Common Var(warn_switch_enum)
bb0814ce 130Warn about all enumerated switches missing a specific case
6f2f567f 131
132Wsystem-headers
2e9da478 133Common Var(warn_system_headers)
72528c71 134Do not suppress warnings from system headers
6f2f567f 135
136Wuninitialized
2e9da478 137Common Var(warn_uninitialized)
bb0814ce 138Warn about uninitialized automatic variables
6f2f567f 139
140Wunreachable-code
2e9da478 141Common Var(warn_notreached)
bb0814ce 142Warn about code that will never be executed
6f2f567f 143
da3b1bab 144Wunused
145Common
53b8e5c1 146Enable all -Wunused- warnings
da3b1bab 147
6f2f567f 148Wunused-function
2e9da478 149Common Var(warn_unused_function)
bb0814ce 150Warn when a function is unused
6f2f567f 151
152Wunused-label
2e9da478 153Common Var(warn_unused_label)
bb0814ce 154Warn when a label is unused
6f2f567f 155
156Wunused-parameter
2e9da478 157Common Var(warn_unused_parameter)
bb0814ce 158Warn when a function parameter is unused
6f2f567f 159
160Wunused-value
2e9da478 161Common Var(warn_unused_value)
bb0814ce 162Warn when an expression value is unused
6f2f567f 163
164Wunused-variable
2e9da478 165Common Var(warn_unused_variable)
bb0814ce 166Warn when a variable is unused
6f2f567f 167
e690b385 168aux-info
169Common Separate
53b8e5c1 170-aux-info <file> Emit declaration information into <file>
e690b385 171
172aux-info=
173Common Joined
174
175auxbase
176Common Separate
177
178auxbase-strip
179Common Separate
180
181d
182Common Joined
53b8e5c1 183-d<letters> Enable dumps from specific passes of the compiler
e690b385 184
185dumpbase
186Common Separate
53b8e5c1 187-dumpbase <file> Set the file basename to be used for dumps
e690b385 188
82a16202 189; The version of the C++ ABI in use. The following values are allowed:
190;
191; 0: The version of the ABI believed most conformant with the C++ ABI
192; specification. This ABI may change as bugs are discovered and fixed.
193; Therefore, 0 will not necessarily indicate the same ABI in different
194; versions of G++.
195;
196; 1: The version of the ABI first used in G++ 3.2.
197;
198; Additional positive integers will be assigned as new versions of
199; the ABI become the default version of the ABI.
e100aadc 200fabi-version=
2e9da478 201Common Joined UInteger Var(flag_abi_version) Init(2)
e100aadc 202
ecdb6d1a 203falign-functions
2e9da478 204Common Report Var(align_functions,0)
72528c71 205Align the start of functions
ecdb6d1a 206
941a4893 207falign-functions=
208Common RejectNegative Joined UInteger
209
ecdb6d1a 210falign-jumps
2e9da478 211Common Report Var(align_jumps,0)
72528c71 212Align labels which are only reached by jumping
ecdb6d1a 213
941a4893 214falign-jumps=
215Common RejectNegative Joined UInteger
216
ecdb6d1a 217falign-labels
2e9da478 218Common Report Var(align_labels,0)
72528c71 219Align all labels
ecdb6d1a 220
941a4893 221falign-labels=
222Common RejectNegative Joined UInteger
223
ecdb6d1a 224falign-loops
2e9da478 225Common Report Var(align_loops)
72528c71 226Align the start of loops
ecdb6d1a 227
941a4893 228falign-loops=
229Common RejectNegative Joined UInteger
230
82a16202 231; This flag is only tested if alias checking is enabled.
232; 0 if pointer arguments may alias each other. True in C.
233; 1 if pointer arguments may not alias each other but may alias
234; global variables.
235; 2 if pointer arguments may not alias each other and may not
236; alias global variables. True in Fortran.
ecdb6d1a 237fargument-alias
2e9da478 238Common Report Var(flag_argument_noalias,0)
72528c71 239Specify that arguments may alias each other and globals
ecdb6d1a 240
241fargument-noalias
2e9da478 242Common Report Var(flag_argument_noalias,1) VarExists
72528c71 243Assume arguments may alias globals but not each other
ecdb6d1a 244
245fargument-noalias-global
2e9da478 246Common Report Var(flag_argument_noalias,2) VarExists
72528c71 247Assume arguments alias neither each other nor globals
ecdb6d1a 248
249fasynchronous-unwind-tables
2e9da478 250Common Report Var(flag_asynchronous_unwind_tables)
72528c71 251Generate unwind tables that are exact at each instruction boundary
ecdb6d1a 252
82a16202 253; -fcheck-bounds causes gcc to generate array bounds checks.
254; For C, C++ and ObjC: defaults off.
255; For Java: defaults to on.
256; For Fortran: defaults to off.
ecdb6d1a 257fbounds-check
2e9da478 258Common Report Var(flag_bounds_check)
72528c71 259Generate code to check bounds before indexing arrays
ecdb6d1a 260
261fbranch-count-reg
2e9da478 262Common Report Var(flag_branch_on_count_reg) Init(1)
72528c71 263Replace add, compare, branch with branch on count register
ecdb6d1a 264
265fbranch-probabilities
2e9da478 266Common Report Var(flag_branch_probabilities)
72528c71 267Use profiling information for branch probabilities
ecdb6d1a 268
1e06725a 269fbranch-target-load-optimize
2e9da478 270Common Report Var(flag_branch_target_load_optimize)
72528c71 271Perform branch target load optimization before prologue / epilogue threading
1e06725a 272
273fbranch-target-load-optimize2
2e9da478 274Common Report Var(flag_branch_target_load_optimize2)
72528c71 275Perform branch target load optimization after prologue / epilogue threading
1e06725a 276
08d163a9 277fbtr-bb-exclusive
2e9da478 278Common Report Var(flag_btr_bb_exclusive)
08d163a9 279Restrict target load migration not to re-use registers in any basic block
280
941a4893 281fcall-saved-
282Common Joined RejectNegative
53b8e5c1 283-fcall-saved-<register> Mark <register> as being preserved across functions
941a4893 284
285fcall-used-
286Common Joined RejectNegative
53b8e5c1 287-fcall-used-<register> Mark <register> as being corrupted by function calls
941a4893 288
82a16202 289; Nonzero for -fcaller-saves: allocate values in regs that need to
290; be saved across function calls, if that produces overall better code.
291; Optional now, so people can test it.
1e06725a 292fcaller-saves
2e9da478 293Common Report Var(flag_caller_saves)
72528c71 294Save registers around function calls
1e06725a 295
ecdb6d1a 296fcommon
2e9da478 297Common Report Var(flag_no_common,0)
72528c71 298Do not put uninitialized globals in the common section
ecdb6d1a 299
300fcprop-registers
2e9da478 301Common Report Var(flag_cprop_registers)
72528c71 302Perform a register copy-propagation optimization pass
ecdb6d1a 303
1e06725a 304fcrossjumping
2e9da478 305Common Report Var(flag_crossjumping)
72528c71 306Perform cross-jumping optimization
1e06725a 307
308fcse-follow-jumps
2e9da478 309Common Report Var(flag_cse_follow_jumps)
72528c71 310When running CSE, follow jumps to their targets
1e06725a 311
312fcse-skip-blocks
2e9da478 313Common Report Var(flag_cse_skip_blocks)
72528c71 314When running CSE, follow conditional jumps
1e06725a 315
45b9d334 316fcx-limited-range
317Common Report Var(flag_cx_limited_range)
318Omit range reduction step when performing complex division
319
ecdb6d1a 320fdata-sections
2e9da478 321Common Report Var(flag_data_sections)
72528c71 322Place data items into their own section
ecdb6d1a 323
82a16202 324; Nonzero for -fdefer-pop: don't pop args after each function call
325; instead save them up to pop many calls' args with one insns.
1e06725a 326fdefer-pop
2e9da478 327Common Report Var(flag_defer_pop)
72528c71 328Defer popping functions args from stack until later
1e06725a 329
330fdelayed-branch
2e9da478 331Common Report Var(flag_delayed_branch)
72528c71 332Attempt to fill delay slots of branch instructions
1e06725a 333
334fdelete-null-pointer-checks
2e9da478 335Common Report Var(flag_delete_null_pointer_checks)
72528c71 336Delete useless null pointer checks
1e06725a 337
338fdiagnostics-show-location=
339Common Joined RejectNegative
53b8e5c1 340-fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics
1e06725a 341
efb9d9ee 342fdiagnostics-show-option
b0932b2f 343Common
efb9d9ee 344Amend appropriate diagnostic messages with the command line option that controls them.
345
4ee9c684 346fdump-
347Common Joined RejectNegative
348-fdump-<type> Dump various compiler internals to a file
349
ecdb6d1a 350fdump-unnumbered
2e9da478 351Common Report Var(flag_dump_unnumbered) VarExists
72528c71 352Suppress output of instruction numbers and line number notes in debugging dumps
ecdb6d1a 353
1e06725a 354feliminate-dwarf2-dups
2e9da478 355Common Report Var(flag_eliminate_dwarf2_dups)
72528c71 356Perform DWARF2 duplicate elimination
1e06725a 357
262444a6 358feliminate-unused-debug-symbols
2e9da478 359Common Report Var(flag_debug_only_used_symbols)
72528c71 360Perform unused type elimination in debug info
262444a6 361
1e06725a 362feliminate-unused-debug-types
2e9da478 363Common Report Var(flag_eliminate_unused_debug_types) Init(1)
72528c71 364Perform unused type elimination in debug info
1e06725a 365
ecdb6d1a 366fexceptions
2e9da478 367Common Report Var(flag_exceptions)
72528c71 368Enable exception handling
ecdb6d1a 369
1e06725a 370fexpensive-optimizations
2e9da478 371Common Report Var(flag_expensive_optimizations)
72528c71 372Perform a number of minor, expensive optimizations
1e06725a 373
941a4893 374ffast-math
375Common
376
ecdb6d1a 377ffinite-math-only
2e9da478 378Common Report Var(flag_finite_math_only)
72528c71 379Assume no NaNs or infinities are generated
ecdb6d1a 380
941a4893 381ffixed-
382Common Joined RejectNegative
53b8e5c1 383-ffixed-<register> Mark <register> as being unavailable to the compiler
941a4893 384
1e06725a 385ffloat-store
2e9da478 386Common Report Var(flag_float_store)
82a16202 387Don't allocate floats and doubles in extended-precision registers
1e06725a 388
82a16202 389; Nonzero for -fforce-addr: load memory address into a register before
390; reference to memory. This makes better cse but slower compilation.
1e06725a 391fforce-addr
2e9da478 392Common Report Var(flag_force_addr)
72528c71 393Copy memory address constants into registers before use
1e06725a 394
82a16202 395; Nonzero for -fforce-mem: load memory value into a register
396; before arithmetic on it. This makes better cse but slower compilation.
1e06725a 397fforce-mem
2e9da478 398Common Report Var(flag_force_mem)
72528c71 399Copy memory operands into registers before use
1e06725a 400
82a16202 401; Nonzero means don't put addresses of constant functions in registers.
402; Used for compiling the Unix kernel, where strange substitutions are
403; done on the assembly output.
1e06725a 404ffunction-cse
2e9da478 405Common Report Var(flag_no_function_cse,0)
72528c71 406Allow function addresses to be held in registers
1e06725a 407
ecdb6d1a 408ffunction-sections
2e9da478 409Common Report Var(flag_function_sections)
72528c71 410Place each function into its own section
ecdb6d1a 411
1e06725a 412fgcse
2e9da478 413Common Report Var(flag_gcse)
72528c71 414Perform global common subexpression elimination
1e06725a 415
416fgcse-lm
2e9da478 417Common Report Var(flag_gcse_lm) Init(1)
72528c71 418Perform enhanced load motion during global common subexpression elimination
1e06725a 419
420fgcse-sm
62434574 421Common Report Var(flag_gcse_sm) Init(0)
72528c71 422Perform store motion after global common subexpression elimination
1e06725a 423
5c47e414 424fgcse-las
62434574 425Common Report Var(flag_gcse_las) Init(0)
839f8415 426Perform redundant load after store elimination in global common subexpression
427elimination
428
429fgcse-after-reload
2e9da478 430Common Report Var(flag_gcse_after_reload)
839f8415 431Perform global common subexpression elimination after register allocation
432has finished.
5c47e414 433
ecdb6d1a 434fguess-branch-probability
2e9da478 435Common Report Var(flag_guess_branch_prob)
72528c71 436Enable guessing of branch probabilities
ecdb6d1a 437
82a16202 438; Nonzero means ignore `#ident' directives. 0 means handle them.
439; Generate position-independent code for executables if possible
440; On SVR4 targets, it also controls whether or not to emit a
441; string identifying the compiler.
ecdb6d1a 442fident
2e9da478 443Common Report Var(flag_no_ident,0)
72528c71 444Process #ident directives
ecdb6d1a 445
1e06725a 446fif-conversion
2e9da478 447Common Report Var(flag_if_conversion)
72528c71 448Perform conversion of conditional jumps to branchless equivalents
1e06725a 449
450fif-conversion2
2e9da478 451Common Report Var(flag_if_conversion2)
72528c71 452Perform conversion of conditional jumps to conditional execution
1e06725a 453
82a16202 454; -finhibit-size-directive inhibits output of .size for ELF.
455; This is used only for compiling crtstuff.c,
456; and it may be extended to other effects
457; needed for crtstuff.c on other systems.
ecdb6d1a 458finhibit-size-directive
2e9da478 459Common Report Var(flag_inhibit_size_directive)
72528c71 460Do not generate .size directives
ecdb6d1a 461
82a16202 462; Nonzero means that functions declared `inline' will be treated
463; as `static'. Prevents generation of zillions of copies of unused
464; static inline functions; instead, `inlines' are written out
465; only when actually used. Used in conjunction with -g. Also
466; does the right thing with #pragma interface.
1e06725a 467finline
2e9da478 468Common Report Var(flag_no_inline,0) Init(2)
72528c71 469Pay attention to the \"inline\" keyword
1e06725a 470
471finline-functions
2e9da478 472Common Report Var(flag_inline_functions)
72528c71 473Integrate simple functions into their callers
1e06725a 474
39470ac3 475finline-limit-
476Common RejectNegative Joined UInteger
477
478finline-limit=
479Common RejectNegative Joined UInteger
53b8e5c1 480-finline-limit=<number> Limit the size of inlined functions to <number>
39470ac3 481
ecdb6d1a 482finstrument-functions
2e9da478 483Common Report Var(flag_instrument_function_entry_exit)
72528c71 484Instrument function entry and exit with profiling calls
ecdb6d1a 485
dec41e98 486fivopts
487Common Report Var(flag_ivopts) Init(1)
488Optimize induction variables on trees
489
51d8e657 490fjump-tables
491Common Var(flag_jump_tables) Init(1)
492Use jump tables for sufficiently large switch statements
493
1e06725a 494fkeep-inline-functions
2e9da478 495Common Report Var(flag_keep_inline_functions)
72528c71 496Generate code for functions even if they are fully inlined
1e06725a 497
498fkeep-static-consts
2e9da478 499Common Report Var(flag_keep_static_consts) Init(1)
72528c71 500Emit static const variables even if they are not used
1e06725a 501
ecdb6d1a 502fleading-underscore
2e9da478 503Common Report Var(flag_leading_underscore) Init(-1)
72528c71 504Give external symbols a leading underscore
ecdb6d1a 505
1e06725a 506floop-optimize
2e9da478 507Common Report Var(flag_loop_optimize)
72528c71 508Perform loop optimizations
1e06725a 509
3a0ecac2 510floop-optimize2
511Common Report Var(flag_loop_optimize2)
512Perform loop optimizations using the new loop optimizer
513
ecdb6d1a 514fmath-errno
2e9da478 515Common Report Var(flag_errno_math) Init(1)
72528c71 516Set errno after built-in math functions
ecdb6d1a 517
518fmem-report
2e9da478 519Common Report Var(mem_report)
72528c71 520Report on permanent memory allocation
ecdb6d1a 521
82a16202 522; This will attempt to merge constant section constants, if 1 only
523; string constants and constants from constant pool, if 2 also constant
524; variables.
ecdb6d1a 525fmerge-all-constants
2e9da478 526Common Report Var(flag_merge_constants,2) Init(1)
72528c71 527Attempt to merge identical constants and constant variables
ecdb6d1a 528
529fmerge-constants
2e9da478 530Common Report Var(flag_merge_constants,1) VarExists
72528c71 531Attempt to merge identical constants across compilation units
ecdb6d1a 532
1e06725a 533fmessage-length=
534Common RejectNegative Joined UInteger
53b8e5c1 535-fmessage-length=<number> Limit diagnostics to <number> characters per line. 0 suppresses line-wrapping
1e06725a 536
406a73e7 537fmodulo-sched
2e9da478 538Common Report Var(flag_modulo_sched)
406a73e7 539Perform SMS based modulo scheduling before the first scheduling pass
540
3a0ecac2 541fmove-loop-invariants
542Common Report Var(flag_move_loop_invariants)
543Move loop invariant computations out of loops
544
4ee9c684 545fmudflap
2e9da478 546Common RejectNegative Report Var(flag_mudflap)
4ee9c684 547Add mudflap bounds-checking instrumentation for single-threaded program.
548
549fmudflapth
2e9da478 550Common RejectNegative Report Var(flag_mudflap_threads)
4ee9c684 551Add mudflap bounds-checking instrumentation for multi-threaded program.
552
553fmudflapir
2e9da478 554Common RejectNegative Report Var(flag_mudflap_ignore_reads)
4ee9c684 555Ignore read operations when inserting mudflap instrumentation.
556
f045d41d 557freschedule-modulo-scheduled-loops
558Common Report Var(flag_resched_modulo_sched)
559Enable/Disable the traditional scheduling in loops that already passed modulo scheduling
560
ecdb6d1a 561fnon-call-exceptions
2e9da478 562Common Report Var(flag_non_call_exceptions)
72528c71 563Support synchronous non-call exceptions
ecdb6d1a 564
1e06725a 565fomit-frame-pointer
2e9da478 566Common Report Var(flag_omit_frame_pointer)
72528c71 567When possible do not generate stack frames
1e06725a 568
ecdb6d1a 569foptimize-register-move
2e9da478 570Common Report Var(flag_regmove)
72528c71 571Do the full register move optimization pass
ecdb6d1a 572
1e06725a 573foptimize-sibling-calls
2e9da478 574Common Report Var(flag_optimize_sibling_calls)
72528c71 575Optimize sibling and tail recursive calls
1e06725a 576
ecdb6d1a 577fpack-struct
2e9da478 578Common Report Var(flag_pack_struct)
72528c71 579Pack structure members together without holes
ecdb6d1a 580
6b5553e5 581fpack-struct=
582Common RejectNegative Joined UInteger
583-fpack-struct=<number> Set initial maximum structure member alignment
584
1e06725a 585fpcc-struct-return
2e9da478 586Common Report Var(flag_pcc_struct_return,1) VarExists
72528c71 587Return small aggregates in memory, not registers
1e06725a 588
589fpeel-loops
2e9da478 590Common Report Var(flag_peel_loops)
72528c71 591Perform loop peeling
1e06725a 592
593fpeephole
2e9da478 594Common Report Var(flag_no_peephole,0)
72528c71 595Enable machine specific peephole optimizations
1e06725a 596
ecdb6d1a 597fpeephole2
2e9da478 598Common Report Var(flag_peephole2)
72528c71 599Enable an RTL peephole pass before sched2
ecdb6d1a 600
82a16202 601fPIC
602Common Report Var(flag_pic,2)
603Generate position-independent code if possible (large mode)
604
605fPIE
606Common Report Var(flag_pie,2)
607Generate position-independent code for executables if possible (large mode)
608
ecdb6d1a 609fpic
2e9da478 610Common Report Var(flag_pic,1) VarExists
82a16202 611Generate position-independent code if possible (small mode)
ecdb6d1a 612
613fpie
2e9da478 614Common Report Var(flag_pie,1) VarExists
82a16202 615Generate position-independent code for executables if possible (small mode)
ecdb6d1a 616
1e06725a 617fprefetch-loop-arrays
2e9da478 618Common Report Var(flag_prefetch_loop_arrays)
72528c71 619Generate prefetch instructions, if available, for arrays in loops
1e06725a 620
ecdb6d1a 621fprofile
2e9da478 622Common Report Var(profile_flag)
72528c71 623Enable basic program profiling code
ecdb6d1a 624
625fprofile-arcs
2e9da478 626Common Report Var(profile_arc_flag)
72528c71 627Insert arc-based program profiling code
ecdb6d1a 628
7dea76ba 629fprofile-generate
630Common
631Enable common options for generating profile info for profile feedback directed optimizations
632
633fprofile-use
634Common
635Enable common options for performing profile feedback directed optimizations
636
1c6a7b8c 637fprofile-values
2e9da478 638Common Report Var(flag_profile_values)
1c6a7b8c 639Insert code to profile values of expressions
640
1e06725a 641frandom-seed
642Common
643
644frandom-seed=
645Common Joined RejectNegative
53b8e5c1 646-frandom-seed=<string> Make compile reproducible using <string>
1e06725a 647
1e06725a 648freg-struct-return
2e9da478 649Common Report Var(flag_pcc_struct_return,0) VarExists
72528c71 650Return small aggregates in registers
1e06725a 651
ecdb6d1a 652fregmove
2e9da478 653Common Report Var(flag_regmove)
72528c71 654Enables a register move optimization
ecdb6d1a 655
656frename-registers
2e9da478 657Common Report Var(flag_rename_registers)
72528c71 658Perform a register renaming optimization pass
ecdb6d1a 659
660freorder-blocks
2e9da478 661Common Report Var(flag_reorder_blocks)
72528c71 662Reorder basic blocks to improve code placement
ecdb6d1a 663
4f18499c 664freorder-blocks-and-partition
2e9da478 665Common Report Var(flag_reorder_blocks_and_partition)
4f18499c 666Reorder basic blocks and partition into hot and cold sections
667
ecdb6d1a 668freorder-functions
2e9da478 669Common Report Var(flag_reorder_functions)
72528c71 670Reorder functions to improve code placement
ecdb6d1a 671
1e06725a 672frerun-cse-after-loop
2e9da478 673Common Report Var(flag_rerun_cse_after_loop)
72528c71 674Add a common subexpression elimination pass after loop optimizations
1e06725a 675
676frerun-loop-opt
2e9da478 677Common Report Var(flag_rerun_loop_opt)
72528c71 678Run the loop optimizer twice
1e06725a 679
5466f589 680frounding-math
2e9da478 681Common Report Var(flag_rounding_math)
5466f589 682Disable optimizations that assume default FP rounding behavior
683
ecdb6d1a 684fsched-interblock
2e9da478 685Common Report Var(flag_schedule_interblock) Init(1)
72528c71 686Enable scheduling across basic blocks
ecdb6d1a 687
688fsched-spec
2e9da478 689Common Report Var(flag_schedule_speculative) Init(1)
72528c71 690Allow speculative motion of non-loads
ecdb6d1a 691
692fsched-spec-load
2e9da478 693Common Report Var(flag_schedule_speculative_load)
72528c71 694Allow speculative motion of some loads
ecdb6d1a 695
696fsched-spec-load-dangerous
2e9da478 697Common Report Var(flag_schedule_speculative_load_dangerous)
72528c71 698Allow speculative motion of more loads
ecdb6d1a 699
1e06725a 700fsched-verbose=
701Common RejectNegative Joined
53b8e5c1 702-fsched-verbose=<number> Set the verbosity level of the scheduler
1e06725a 703
ecdb6d1a 704fsched2-use-superblocks
2e9da478 705Common Report Var(flag_sched2_use_superblocks)
72528c71 706If scheduling post reload, do superblock scheduling
ecdb6d1a 707
708fsched2-use-traces
2e9da478 709Common Report Var(flag_sched2_use_traces)
72528c71 710If scheduling post reload, do trace scheduling
ecdb6d1a 711
1e06725a 712fschedule-insns
2e9da478 713Common Report Var(flag_schedule_insns)
72528c71 714Reschedule instructions before register allocation
1e06725a 715
716fschedule-insns2
2e9da478 717Common Report Var(flag_schedule_insns_after_reload)
72528c71 718Reschedule instructions after register allocation
1e06725a 719
82a16202 720; sched_stalled_insns means that insns can be moved prematurely from the queue
721; of stalled insns into the ready list.
52c4b43f 722fsched-stalled-insns
2e9da478 723Common Report Var(flag_sched_stalled_insns)
52c4b43f 724Allow premature scheduling of queued insns
725
726fsched-stalled-insns=
727Common RejectNegative Joined UInteger
98b93ebb 728-fsched-stalled-insns=<number> Set number of queued insns that can be prematurely scheduled
52c4b43f 729
82a16202 730; sched_stalled_insns_dep controls how many recently scheduled cycles will
731; be examined for a dependency on a stalled insn that is candidate for
732; premature removal from the queue of stalled insns into the ready list (has
733; an effect only if the flag 'sched_stalled_insns' is set).
52c4b43f 734fsched-stalled-insns-dep
2e9da478 735Common Report Var(flag_sched_stalled_insns_dep,1) Init(1)
52c4b43f 736Set dependence distance checking in premature scheduling of queued insns
737
738fsched-stalled-insns-dep=
739Common RejectNegative Joined UInteger
98b93ebb 740-fsched-stalled-insns-dep=<number> Set dependence distance checking in premature scheduling of queued insns
52c4b43f 741
1e06725a 742fshared-data
2e9da478 743Common Report Var(flag_shared_data)
72528c71 744Mark data as shared rather than private
1e06725a 745
5fd4bf3b 746fshow-column
747Common C ObjC C++ ObjC++ Report Var(flag_show_column) Init(1)
748Show column numbers in diagnostics, when available. Default on.
749
ecdb6d1a 750fsignaling-nans
2e9da478 751Common Report Var(flag_signaling_nans)
72528c71 752Disable optimizations observable by IEEE signaling NaNs
ecdb6d1a 753
754fsingle-precision-constant
2e9da478 755Common Report Var(flag_single_precision_constant)
72528c71 756Convert floating point constants to single precision constants
ecdb6d1a 757
8a5df2ce 758fspeculative-prefetching
759Common Report Var(flag_speculative_prefetching)
760Use value profiling for speculative prefetching
761
a9989fb4 762fsplit-ivs-in-unroller
763Common Report Var(flag_split_ivs_in_unroller) Init(1)
764Split lifetimes of induction variables when loops are unrolled.
765
375bb675 766fvariable-expansion-in-unroller
767Common Report Var(flag_variable_expansion_in_unroller)
768Apply variable expansion when loops are unrolled.
769
82a16202 770; Emit code to probe the stack, to help detect stack overflow; also
771; may cause large objects to be allocated dynamically.
ecdb6d1a 772fstack-check
2e9da478 773Common Report Var(flag_stack_check)
72528c71 774Insert stack checking code into the program
ecdb6d1a 775
1e06725a 776fstack-limit
777Common
778
941a4893 779fstack-limit-register=
780Common RejectNegative Joined
53b8e5c1 781-fstack-limit-register=<register> Trap if the stack goes past <register>
941a4893 782
783fstack-limit-symbol=
784Common RejectNegative Joined
53b8e5c1 785-fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>
941a4893 786
1e06725a 787fstrength-reduce
2e9da478 788Common Report Var(flag_strength_reduce)
72528c71 789Perform strength reduction optimizations
1e06725a 790
82a16202 791; Nonzero if we should do (language-dependent) alias analysis.
792; Typically, this analysis will assume that expressions of certain
793; types do not alias expressions of certain other types. Only used
794; if alias analysis (in general) is enabled.
ecdb6d1a 795fstrict-aliasing
2e9da478 796Common Report Var(flag_strict_aliasing)
72528c71 797Assume strict aliasing rules apply
ecdb6d1a 798
1e06725a 799fsyntax-only
2e9da478 800Common Report Var(flag_syntax_only)
72528c71 801Check for syntax errors, then stop
1e06725a 802
ecdb6d1a 803ftest-coverage
2e9da478 804Common Report Var(flag_test_coverage)
72528c71 805Create data files needed by \"gcov\"
ecdb6d1a 806
1e06725a 807fthread-jumps
2e9da478 808Common Report Var(flag_thread_jumps)
72528c71 809Perform jump threading optimizations
1e06725a 810
ecdb6d1a 811ftime-report
2e9da478 812Common Report Var(time_report)
72528c71 813Report the time taken by each compiler pass
ecdb6d1a 814
941a4893 815ftls-model=
816Common Joined RejectNegative
53b8e5c1 817-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec] Set the default thread-local storage code generation model
941a4893 818
1e06725a 819ftracer
2e9da478 820Common Report Var(flag_tracer)
72528c71 821Perform superblock formation via tail duplication
1e06725a 822
82a16202 823; Zero means that floating-point math operations cannot generate a
824; (user-visible) trap. This is the case, for example, in nonstop
825; IEEE 754 arithmetic.
ecdb6d1a 826ftrapping-math
a619b050 827Common Report Var(flag_trapping_math) Init(1)
72528c71 828Assume floating-point operations can trap
ecdb6d1a 829
830ftrapv
2e9da478 831Common Report Var(flag_trapv)
72528c71 832Trap for signed overflow in addition, subtraction and multiplication
ecdb6d1a 833
4ee9c684 834ftree-based-profiling
2e9da478 835Common Report Var(flag_tree_based_profiling)
4ee9c684 836Use tree-ssa based implementation of profiling
837
838ftree-ccp
2e9da478 839Common Report Var(flag_tree_ccp)
4ee9c684 840Enable SSA-CCP optimization on trees
841
88dbf20f 842ftree-store-ccp
843Common Report Var(flag_tree_store_ccp)
844Enable SSA-CCP optimization for stores and loads
845
4ee9c684 846ftree-ch
2e9da478 847Common Report Var(flag_tree_ch)
4ee9c684 848Enable loop header copying on trees
849
850ftree-combine-temps
2e9da478 851Common Report Var(flag_tree_combine_temps)
4ee9c684 852Coalesce memory temporaries in the SSA->normal pass
853
854ftree-copyrename
2e9da478 855Common Report Var(flag_tree_copyrename)
4ee9c684 856Replace SSA temporaries with better names in copies.
857
88dbf20f 858ftree-copy-prop
859Common Report Var(flag_tree_copy_prop)
860Enable copy propagation on trees
861
862ftree-store-copy-prop
863Common Report Var(flag_tree_store_copy_prop)
864Enable copy propagation for stores and loads
865
4ee9c684 866ftree-dce
2e9da478 867Common Report Var(flag_tree_dce)
4ee9c684 868Enable SSA dead code elimination optimization on trees
869
870ftree-dominator-opts
2e9da478 871Common Report Var(flag_tree_dom)
4ee9c684 872Enable dominator optimizations
873
874ftree-dse
2e9da478 875Common Report Var(flag_tree_dse)
4ee9c684 876Enable dead store elimination
877
591c2a30 878ftree-fre
879Common Report Var(flag_tree_fre)
880Enable Full Redundancy Elimination (FRE) on trees
881
41b5cc78 882ftree-loop-im
883Common Report Var(flag_tree_loop_im) Init(1)
7d23383d 884Enable loop invariant motion on trees
885
60cfcb79 886ftree-loop-linear
887Common Report Var(flag_tree_loop_linear)
888Enable linear loop transforms on trees
889
41b5cc78 890ftree-loop-ivcanon
08162157 891Common Report Var(flag_tree_loop_ivcanon) Init(1)
41b5cc78 892Create canonical induction variables in loops
893
dcb9eccb 894ftree-loop-optimize
895Common Report Var(flag_tree_loop_optimize) Init(1)
896Enable loop optimizations on tree level
897
4ee9c684 898ftree-pre
2e9da478 899Common Report Var(flag_tree_pre)
4ee9c684 900Enable SSA-PRE optimization on trees
901
2be14d8b 902ftree-salias
903Common Report Var(flag_tree_salias)
904Perform structural alias analysis
905
5e733b02 906ftree-sink
907Common Report Var(flag_tree_sink)
908Enable SSA code sinking on trees
909
4ee9c684 910ftree-sra
2e9da478 911Common Report Var(flag_tree_sra)
4ee9c684 912Perform scalar replacement of aggregates
913
914ftree-ter
2e9da478 915Common Report Var(flag_tree_ter)
4ee9c684 916Replace temporary expressions in the SSA->normal pass
917
918ftree-lrs
2e9da478 919Common Report Var(flag_tree_live_range_split)
4ee9c684 920Perform live range splitting during the SSA->normal pass.
921
88dbf20f 922ftree-vrp
923Common Report Var(flag_tree_vrp) Init(0)
924Perform Value Range Propagation on trees
925
1e06725a 926funit-at-a-time
2e9da478 927Common Report Var(flag_unit_at_a_time)
72528c71 928Compile whole compilation unit at a time
1e06725a 929
930funroll-loops
2e9da478 931Common Report Var(flag_unroll_loops)
72528c71 932Perform loop unrolling when iteration count is known
1e06725a 933
934funroll-all-loops
2e9da478 935Common Report Var(flag_unroll_all_loops)
72528c71 936Perform loop unrolling for all loops
1e06725a 937
82a16202 938; Nonzero means that unsafe floating-point math optimizations are allowed
939; for the sake of speed. IEEE compliance is not guaranteed, and operations
940; are allowed to assume that their arguments and results are "normal"
941; (e.g., nonnegative for SQRT).
ecdb6d1a 942funsafe-math-optimizations
2e9da478 943Common Report Var(flag_unsafe_math_optimizations)
72528c71 944Allow math optimizations that may violate IEEE or ISO standards
ecdb6d1a 945
1e06725a 946funswitch-loops
2e9da478 947Common Report Var(flag_unswitch_loops)
72528c71 948Perform loop unswitching
1e06725a 949
ecdb6d1a 950funwind-tables
2e9da478 951Common Report Var(flag_unwind_tables)
72528c71 952Just generate unwind tables for exception handling
ecdb6d1a 953
5923a5e7 954fvar-tracking
2e9da478 955Common Report Var(flag_var_tracking) VarExists
5923a5e7 956Perform variable tracking
957
c91e8223 958ftree-vectorize
959Common Report Var(flag_tree_vectorize)
960Enable loop vectorization on trees
961
459e8543 962ftree-vectorizer-verbose=
963Common RejectNegative Joined
98b93ebb 964-ftree-vectorizer-verbose=<number> Set the verbosity level of the vectorizer
459e8543 965
82a16202 966; -fverbose-asm causes extra commentary information to be produced in
967; the generated assembly code (to make it more readable). This option
968; is generally only of use to those who actually need to read the
969; generated assembly code (perhaps while debugging the compiler itself).
970; -fno-verbose-asm, the default, causes the extra information
971; to not be added and is useful when comparing two assembler files.
ecdb6d1a 972fverbose-asm
2e9da478 973Common Report Var(flag_verbose_asm)
72528c71 974Add extra commentary to assembler output
ecdb6d1a 975
b212f378 976fvisibility=
977Common Joined RejectNegative
978-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility
979
980
1c6a7b8c 981fvpt
2e9da478 982Common Report Var(flag_value_profile_transformations)
1c6a7b8c 983Use expression value profiles in optimizations
984
eeb4a70e 985fweb
62434574 986Common Report Var(flag_web) Init(0)
eeb4a70e 987Construct webs and split unrelated uses of single variable
988
ecdb6d1a 989fwrapv
2e9da478 990Common Report Var(flag_wrapv)
72528c71 991Assume signed arithmetic overflow wraps around
ecdb6d1a 992
ecdb6d1a 993fzero-initialized-in-bss
2e9da478 994Common Report Var(flag_zero_initialized_in_bss) Init(1)
72528c71 995Put zero initialized data in the bss section
ecdb6d1a 996
6f2f567f 997g
998Common JoinedOrMissing
b0e56fb1 999Generate debug information in default format
1000
1001gcoff
1002Common JoinedOrMissing
1003Generate debug information in COFF format
1004
b0e56fb1 1005gdwarf-2
1006Common JoinedOrMissing
1007Generate debug information in DWARF v2 format
1008
1009ggdb
1010Common JoinedOrMissing
1011Generate debug information in default extended format
1012
1013gstabs
1014Common JoinedOrMissing
1015Generate debug information in STABS format
1016
1017gstabs+
1018Common JoinedOrMissing
1019Generate debug information in extended STABS format
1020
1021gvms
1022Common JoinedOrMissing
1023Generate debug information in VMS format
1024
1025gxcoff
1026Common JoinedOrMissing
1027Generate debug information in XCOFF format
1028
1029gxcoff+
1030Common JoinedOrMissing
1031Generate debug information in extended XCOFF format
6f2f567f 1032
e690b385 1033o
1034Common Joined Separate
53b8e5c1 1035-o <file> Place output into <file>
e690b385 1036
1037p
2e9da478 1038Common Var(profile_flag)
53b8e5c1 1039Enable function profiling
e690b385 1040
1041pedantic
2e9da478 1042Common Var(pedantic)
53b8e5c1 1043Issue warnings needed for strict compliance to the standard
e690b385 1044
1045pedantic-errors
1046Common
53b8e5c1 1047Like -pedantic but issue them as errors
e690b385 1048
3272db82 1049quiet
2e9da478 1050Common Var(quiet_flag)
53b8e5c1 1051Do not display functions compiled or elapsed time
3272db82 1052
e690b385 1053version
2e9da478 1054Common Var(version_flag)
53b8e5c1 1055Display the compiler's version
e690b385 1056
1057w
2e9da478 1058Common Var(inhibit_warnings)
53b8e5c1 1059Suppress warnings
e690b385 1060
3272db82 1061; This comment is to ensure we retain the blank line above.