aboutsummaryrefslogtreecommitdiff
path: root/gcc/common.opt
blob: e04584894e4bc4c1e204152643246d0040552a77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
; Options for the language- and target-independent parts of the compiler.
; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
; GCC is free software; you can redistribute it and/or modify it under
; the terms of the GNU General Public License as published by the Free
; Software Foundation; either version 2, or (at your option) any later
; version.
; 
; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
; WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
; for more details.
; 
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING.  If not, write to the Free
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.

; See c.opt for a description of this file's format.

; Please try to keep this file in ASCII collating order.

-help
Common
Display this information

-param
Common Separate
--param <param>=<value>	Set paramter <param> to value.  See below for a complete list of parameters

-target-help
Common

-version
Common

G
Common Joined Separate UInteger
-G<number>	Put global and static data smaller than <number> bytes into a special section (on some targets)

O
Common JoinedOrMissing
-O<number>	Set optimization level to <number>

Os
Common
Optimize for space rather than speed

W
Common RejectNegative
This switch is deprecated; use -Wextra instead

Waggregate-return
Common
Warn about returning structures, unions or arrays

Wcast-align
Common
Warn about pointer casts which increase alignment

Wdeprecated-declarations
Common
Warn about uses of __attribute__((deprecated)) declarations

Wdisabled-optimization
Common
Warn when an optimization pass is disabled

Werror
Common
Treat all warnings as errors

Wextra
Common
Print extra (possibly unwanted) warnings

Winline
Common
Warn when an inlined function cannot be inlined

Wlarger-than-
Common RejectNegative Joined UInteger
-Wlarger-than-<number>	Warn if an object is larger than <number> bytes

Wmissing-noreturn
Common
Warn about functions which might be candidates for __attribute__((noreturn))

Wpacked
Common
Warn when the packed attribute has no effect on struct layout

Wpadded
Common
Warn when padding is required to align structure members

Wshadow
Common
Warn when one local variable shadows another

Wstrict-aliasing
Common
Warn about code which might break strict aliasing rules

Wswitch
Common
Warn about enumerated switches, with no default, missing a case

Wswitch-default
Common
Warn about enumerated switches missing a \"default:\" statement

Wswitch-enum
Common
Warn about all enumerated switches missing a specific case

Wsystem-headers
Common
Do not suppress warnings from system headers

Wuninitialized
Common
Warn about uninitialized automatic variables

Wunreachable-code
Common
Warn about code that will never be executed

Wunused
Common
Enable all -Wunused- warnings

Wunused-function
Common
Warn when a function is unused

Wunused-label
Common
Warn when a label is unused

Wunused-parameter
Common
Warn when a function parameter is unused

Wunused-value
Common
Warn when an expression value is unused

Wunused-variable
Common
Warn when a variable is unused

; APPLE LOCAL begin fat builds
arch
Common Separate

; APPLE LOCAL end fat builds

aux-info
Common Separate
-aux-info <file>	Emit declaration information into <file>

aux-info=
Common Joined

auxbase
Common Separate

auxbase-strip
Common Separate

d
Common Joined
-d<letters>	Enable dumps from specific passes of the compiler

dumpbase
Common Separate
-dumpbase <file>	Set the file basename to be used for dumps

fPIC
Common

fPIE
Common

fabi-version=
Common Joined UInteger

falign-functions
Common
Align the start of functions

falign-functions=
Common RejectNegative Joined UInteger

falign-jumps
Common
Align labels which are only reached by jumping

falign-jumps=
Common RejectNegative Joined UInteger

falign-labels
Common
Align all labels

falign-labels=
Common RejectNegative Joined UInteger

falign-loops
Common
Align the start of loops

falign-loops=
Common RejectNegative Joined UInteger

fall-data-deps
Common
Analyze all the data dependences 

ftree-ddg
Common
Enable data dependence graph

fargument-alias
Common
Specify that arguments may alias each other and globals

fargument-noalias
Common
Assume arguments may alias globals but not each other

fargument-noalias-global
Common
Assume arguments alias neither each other nor globals

fasynchronous-unwind-tables
Common
Generate unwind tables that are exact at each instruction boundary

fbounds-check
Common
Generate code to check bounds before indexing arrays

fbranch-count-reg
Common
Replace add, compare, branch with branch on count register

fbranch-probabilities
Common
Use profiling information for branch probabilities

fbranch-target-load-optimize
Common
Perform branch target load optimization before prologue / epilogue threading

fbranch-target-load-optimize2
Common
Perform branch target load optimization after prologue / epilogue threading

fbtr-bb-exclusive
Common
Restrict target load migration not to re-use registers in any basic block

fcall-saved-
Common Joined RejectNegative
-fcall-saved-<register>	Mark <register> as being preserved across functions

fcall-used-
Common Joined RejectNegative
-fcall-used-<register>	Mark <register> as being corrupted by function calls

fcaller-saves
Common
Save registers around function calls

; APPLE LOCAL begin coalescing  turly
fcoalesce
Common
Coalesce duplicate C++ functions and data

fcoalesce-templates
Common
Coalesce duplicate C++ templates
; APPLE LOCAL end coalescing  turly

fcommon
Common
Do not put uninitialized globals in the common section

fcprop-registers
Common
Perform a register copy-propagation optimization pass

fcrossjumping
Common
Perform cross-jumping optimization

fcse-follow-jumps
Common
When running CSE, follow jumps to their targets

fcse-skip-blocks
Common
When running CSE, follow conditional jumps

fdata-sections
Common
Place data items into their own section

fdefer-pop
Common
Defer popping functions args from stack until later

fdelayed-branch
Common
Attempt to fill delay slots of branch instructions

fdelete-null-pointer-checks
Common
Delete useless null pointer checks

fdiagnostics-show-location=
Common Joined RejectNegative
-fdiagnostics-show-location=[once|every-line]	How often to emit source location at the beginning of line-wrapped diagnostics

fdump-
Common Joined RejectNegative
-fdump-<type>	Dump various compiler internals to a file

fdump-unnumbered
Common
Suppress output of instruction numbers and line number notes in debugging dumps

feliminate-dwarf2-dups
Common
Perform DWARF2 duplicate elimination

feliminate-unused-debug-symbols
Common
Perform unused type elimination in debug info

feliminate-unused-debug-types
Common
Perform unused type elimination in debug info

fexceptions
Common
Enable exception handling

fexpensive-optimizations
Common
Perform a number of minor, expensive optimizations

; APPLE LOCAL begin coalescing  turly
fexport-coalesced
Common
EXPERIMENTAL: Export coalesced symbols from dylibs
; APPLE LOCAL end coalescing  turly

ffast-math
Common

ffinite-math-only
Common
Assume no NaNs or infinities are generated

ffixed-
Common Joined RejectNegative
-ffixed-<register>	Mark <register> as being unavailable to the compiler

ffloat-store
Common
Do not store floats in registers

fforce-addr
Common
Copy memory address constants into registers before use

fforce-mem
Common
Copy memory operands into registers before use

ffunction-cse
Common
Allow function addresses to be held in registers

ffunction-sections
Common
Place each function into its own section

fgcse
Common
Perform global common subexpression elimination

fgcse-lm
Common
Perform enhanced load motion during global common subexpression elimination

fgcse-sm
Common
Perform store motion after global common subexpression elimination

fgcse-las
Common
Perform redundant load after store elimination in global common subexpression
elimination

fgcse-after-reload
Common
Perform global common subexpression elimination after register allocation
has finished.

fguess-branch-probability
Common
Enable guessing of branch probabilities

fident
Common
Process #ident directives

fif-conversion
Common
Perform conversion of conditional jumps to branchless equivalents

fif-conversion2
Common
Perform conversion of conditional jumps to conditional execution

finhibit-size-directive
Common
Do not generate .size directives

finline
Common
Pay attention to the \"inline\" keyword

finline-functions
Common
Integrate simple functions into their callers

finline-limit-
Common RejectNegative Joined UInteger

finline-limit=
Common RejectNegative Joined UInteger
-finline-limit=<number>	Limit the size of inlined functions to <number>

finstrument-functions
Common
Instrument function entry and exit with profiling calls

fkeep-inline-functions
Common
Generate code for functions even if they are fully inlined

fkeep-static-consts
Common
Emit static const variables even if they are not used

fleading-underscore
Common
Give external symbols a leading underscore

floop-optimize
Common
Perform loop optimizations

floop-transpose
Common
Interchange loops to improve cache locality

floop-optimize2
Common
Perform loop optimizations, new passes

fmath-errno
Common
Set errno after built-in math functions

fmem-report
Common
Report on permanent memory allocation

fmerge-all-constants
Common
Attempt to merge identical constants and constant variables

fmerge-constants
Common
Attempt to merge identical constants across compilation units

fmessage-length=
Common RejectNegative Joined UInteger
-fmessage-length=<number>	Limit diagnostics to <number> characters per line.  0 suppresses line-wrapping

fmove-all-movables
Common
Force all loop invariant computations out of loops

fmudflap
Common RejectNegative
Add mudflap bounds-checking instrumentation for single-threaded program.

fmudflapth
Common RejectNegative
Add mudflap bounds-checking instrumentation for multi-threaded program.

fmudflapir
Common RejectNegative
Ignore read operations when inserting mudflap instrumentation.

fnew-ra
Common
Use graph-coloring register allocation

fnon-call-exceptions
Common
Support synchronous non-call exceptions

; APPLE LOCAL begin -fobey-inline
fobey-inline
Common
Obey 'inline' keyword and always inline, regardless of size
; APPLE LOCAL end -fobey-inline

fold-unroll-loops
Common
Perform loop unrolling when iteration count is known

fold-unroll-all-loops
Common
Perform loop unrolling for all loops

fomit-frame-pointer
Common
When possible do not generate stack frames

foptimize-register-move
Common
Do the full register move optimization pass

foptimize-sibling-calls
Common
Optimize sibling and tail recursive calls

fpack-struct
Common
Pack structure members together without holes

; APPLE LOCAL begin Pascal strings 2001-07-05 zll
fpascal-strings
Common
Allow Pascal-style string literals
; APPLE LOCAL end Pascal strings 2001-07-05 zll

fpcc-struct-return
Common
Return small aggregates in memory, not registers

fpeel-loops
Common
Perform loop peeling

fpeephole
Common
Enable machine specific peephole optimizations

fpeephole2
Common
Enable an RTL peephole pass before sched2

fpic
Common
Generate position-independent code if possible

fpie
Common
Generate position-independent code for executables if possible

; APPLE LOCAL begin -ffppc 2001-08-01 sts
fppc
Common
Perform floating-point precision-control pass
; APPLE LOCAL end -ffppc 2001-08-01 sts

fprefetch-loop-arrays
Common
Generate prefetch instructions, if available, for arrays in loops

fprofile
Common
Enable basic program profiling code

fprofile-arcs
Common
Insert arc-based program profiling code

fprofile-generate
Common
Enable common options for generating profile info for profile feedback directed optimizations

fprofile-use
Common
Enable common options for performing profile feedback directed optimizations

fprofile-values
Common
Insert code to profile values of expressions

frandom-seed
Common

frandom-seed=
Common Joined RejectNegative
-frandom-seed=<string>	Make compile reproducible using <string>

freduce-all-givs
Common
Strength reduce all loop general induction variables

freg-struct-return
Common
Return small aggregates in registers

fregmove
Common
Enables a register move optimization

frename-registers
Common
Perform a register renaming optimization pass

freorder-blocks
Common
Reorder basic blocks to improve code placement

freorder-blocks-and-partition
Common
Reorder basic blocks and partition into hot and cold sections

freorder-functions
Common
Reorder functions to improve code placement

frerun-cse-after-loop
Common
Add a common subexpression elimination pass after loop optimizations

frerun-loop-opt
Common
Run the loop optimizer twice

frounding-math
Common
Disable optimizations that assume default FP rounding behavior

fscalar-evolutions
Common
Enable the analysis of scalar evolutions on trees

fsched-interblock
Common
Enable scheduling across basic blocks

fsched-spec
Common
Allow speculative motion of non-loads

fsched-spec-load
Common
Allow speculative motion of some loads

fsched-spec-load-dangerous
Common
Allow speculative motion of more loads

fsched-verbose=
Common RejectNegative Joined
-fsched-verbose=<number>	Set the verbosity level of the scheduler

fsched2-use-superblocks
Common
If scheduling post reload, do superblock scheduling

fsched2-use-traces
Common
If scheduling post reload, do trace scheduling

fschedule-insns
Common
Reschedule instructions before register allocation

fschedule-insns2
Common
Reschedule instructions after register allocation

fsched-stalled-insns
Common
Allow premature scheduling of queued insns

fsched-stalled-insns=
Common RejectNegative Joined UInteger 
-fsched-stalled-insns=<number>       Set number of queued insns that can be prematurely scheduled

fsched-stalled-insns-dep
Common
Set dependence distance checking in premature scheduling of queued insns

fsched-stalled-insns-dep=
Common RejectNegative Joined UInteger
-fsched-stalled-insns-dep=<number>   Set dependence distance checking in premature scheduling of queued insns

fshared-data
Common
Mark data as shared rather than private

fsignaling-nans
Common
Disable optimizations observable by IEEE signaling NaNs

fsingle-precision-constant
Common
Convert floating point constants to single precision constants

fstack-check
Common
Insert stack checking code into the program

fstack-limit
Common

fstack-limit-register=
Common RejectNegative Joined
-fstack-limit-register=<register>	Trap if the stack goes past <register>

fstack-limit-symbol=
Common RejectNegative Joined
-fstack-limit-symbol=<name>	Trap if the stack goes past symbol <name>

fstrength-reduce
Common
Perform strength reduction optimizations

fstrict-aliasing
Common
Assume strict aliasing rules apply

fsyntax-only
Common
Check for syntax errors, then stop

ftest-coverage
Common
Create data files needed by \"gcov\"

fthread-jumps
Common
Perform jump threading optimizations

ftime-report
Common
Report the time taken by each compiler pass

ftls-model=
Common Joined RejectNegative
-ftls-model=[global-dynamic|local-dynamic|initial-exec|local-exec]	Set the default thread-local storage code generation model

ftracer
Common
Perform superblock formation via tail duplication

ftrapping-math
Common
Assume floating-point operations can trap

ftrapv
Common
Trap for signed overflow in addition, subtraction and multiplication

ftree-based-profiling
Common
Use tree-ssa based implementation of profiling

ftree-ccp
Common
Enable SSA-CCP optimization on trees

ftree-ch
Common
Enable loop header copying on trees

ftree-combine-temps
Common
Coalesce memory temporaries in the SSA->normal pass

ftree-copyrename
Common
Replace SSA temporaries with better names in copies.

ftree-dce
Common
Enable SSA dead code elimination optimization on trees

ftree-dominator-opts
Common
Enable dominator optimizations

ftree-dse
Common
Enable dead store elimination

ftree-elim-checks
Common
Eliminate checks based on scalar evolution informations

ftree-loop-linear
Common
Enable linear loop transforms on trees

ftree-loop-optimize
Common
Enable loop optimizations on trees

ftree-points-to=
Common Joined RejectNegative

ftree-pre
Common
Enable SSA-PRE optimization on trees

ftree-sra
Common
Perform scalar replacement of aggregates

ftree-ter
Common
Replace temporary expressions in the SSA->normal pass

ftree-vectorize
Common
Enable loop vectorization on trees

funit-at-a-time
Common
Compile whole compilation unit at a time

funroll-loops
Common
Perform loop unrolling when iteration count is known

funroll-all-loops
Common
Perform loop unrolling for all loops

funsafe-math-optimizations
Common
Allow math optimizations that may violate IEEE or ISO standards

funswitch-loops
Common
Perform loop unswitching

funwind-tables
Common
Just generate unwind tables for exception handling

fvar-tracking
Common
Perform variable tracking

fverbose-asm
Common
Add extra commentary to assembler output

fvpt
Common
Use expression value profiles in optimizations

; APPLE LOCAL begin coalescing  turly
fweak-coalesced
Common
Use the OS X 10.2 'weak_definitions' attribute when coalescing
; APPLE LOCAL end coalescing  turly

fweb
Common
Construct webs and split unrelated uses of single variable

fwrapv
Common
Assume signed arithmetic overflow wraps around

fzero-initialized-in-bss
Common
Put zero initialized data in the bss section

g
Common JoinedOrMissing
Generate debug information in default format

gcoff
Common JoinedOrMissing
Generate debug information in COFF format

gdwarf-2
Common JoinedOrMissing
Generate debug information in DWARF v2 format

ggdb
Common JoinedOrMissing
Generate debug information in default extended format

gstabs
Common JoinedOrMissing
Generate debug information in STABS format

gstabs+
Common JoinedOrMissing
Generate debug information in extended STABS format

gvms
Common JoinedOrMissing
Generate debug information in VMS format

gxcoff
Common JoinedOrMissing
Generate debug information in XCOFF format

gxcoff+
Common JoinedOrMissing
Generate debug information in extended XCOFF format

; APPLE LOCAL begin -header-mapfile
header-mapfile
Common Separate

; APPLE LOCAL end -header-mapfile

m
Common Joined

o
Common Joined Separate
-o <file>	Place output into <file>

p
Common
Enable function profiling

pedantic
Common
Issue warnings needed for strict compliance to the standard

pedantic-errors
Common
Like -pedantic but issue them as errors

; APPLE LOCAL begin -precomp-trustfile
precomp-trustfile
Common Separate

; APPLE LOCAL end -precomp-trustfile

quiet
Common
Do not display functions compiled or elapsed time

version
Common
Display the compiler's version

w
Common
Suppress warnings

; This comment is to ensure we retain the blank line above.