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