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