gcc -c -Q -O1 --help=optimizers
The following options control optimizations:
-O<number>
-Ofast
-Og
-Os
-faggressive-loop-optimizations [enabled]
-falign-functions [disabled]
-falign-jumps [disabled]
-falign-labels [disabled]
-falign-loops [disabled]
-fasynchronous-unwind-tables [enabled]
-fbranch-count-reg [enabled]
-fbranch-probabilities [disabled]
-fbranch-target-load-optimize [disabled]
-fbranch-target-load-optimize2 [disabled]
-fbtr-bb-exclusive [disabled]
-fcaller-saves [disabled]
-fcombine-stack-adjustments [enabled]
-fcommon [enabled]
-fcompare-elim [enabled]
-fconserve-stack [disabled]
-fcprop-registers [enabled]
-fcrossjumping [disabled]
-fcse-follow-jumps [disabled]
-fcx-fortran-rules [disabled]
-fcx-limited-range [disabled]
-fdata-sections [disabled]
-fdce [enabled]
-fdefer-pop [enabled]
-fdelayed-branch [disabled]
-fdelete-null-pointer-checks [enabled]
-fdevirtualize [disabled]
-fdse [enabled]
-fearly-inlining [enabled]
-fexceptions [disabled]
-fexpensive-optimizations [disabled]
-ffinite-math-only [disabled]
-ffloat-store [disabled]
-fforward-propagate [enabled]
-fgcse [disabled]
-fgcse-after-reload [disabled]
-fgcse-las [disabled]
-fgcse-lm [enabled]
-fgcse-sm [disabled]
-fgraphite-identity [disabled]
-fguess-branch-probability [enabled]
-fhandle-exceptions
-fhoist-adjacent-loads [disabled]
-fif-conversion [enabled]
-fif-conversion2 [enabled]
-finline [enabled]
-finline-atomics [enabled]
-finline-functions [disabled]
-finline-functions-called-once [enabled]
-finline-small-functions [disabled]
-fipa-cp [disabled]
-fipa-cp-clone [disabled]
-fipa-profile [enabled]
-fipa-pta [disabled]
-fipa-pure-const [enabled]
-fipa-reference [enabled]
-fipa-sra [disabled]
-fira-hoist-pressure [enabled]
-fivopts [enabled]
-fjump-tables [enabled]
-floop-block [disabled]
-floop-interchange [disabled]
-floop-nest-optimize [disabled]
-floop-parallelize-all [disabled]
-floop-strip-mine [disabled]
-fmath-errno [enabled]
-fmerge-all-constants [disabled]
-fmerge-constants [enabled]
-fmodulo-sched [disabled]
-fmove-loop-invariants [enabled]
-fnon-call-exceptions [disabled]
-fnothrow-opt [disabled]
-fomit-frame-pointer [disabled]
-fopt-info [disabled]
-foptimize-register-move [disabled]
-foptimize-sibling-calls [disabled]
-foptimize-strlen [disabled]
-fpack-struct [disabled]
-fpack-struct=<number>
-fpeel-loops [disabled]
-fpeephole [enabled]
-fpeephole2 [disabled]
-fpredictive-commoning [disabled]
-fprefetch-loop-arrays [enabled]
-freg-struct-return [disabled]
-fregmove [disabled]
-frename-registers [enabled]
-freorder-blocks [disabled]
-freorder-blocks-and-partition [disabled]
-freorder-functions [disabled]
-frerun-cse-after-loop [disabled]
-freschedule-modulo-scheduled-loops [disabled]
-frounding-math [disabled]
-frtti [enabled]
-fsched-critical-path-heuristic [enabled]
-fsched-dep-count-heuristic [enabled]
-fsched-group-heuristic [enabled]
-fsched-interblock [enabled]
-fsched-last-insn-heuristic [enabled]
-fsched-pressure [disabled]
-fsched-rank-heuristic [enabled]
-fsched-spec [enabled]
-fsched-spec-insn-heuristic [enabled]
-fsched-spec-load [disabled]
-fsched-spec-load-dangerous [disabled]
-fsched-stalled-insns [disabled]
-fsched-stalled-insns-dep [enabled]
-fsched2-use-superblocks [disabled]
-fschedule-insns [disabled]
-fschedule-insns2 [disabled]
-fsection-anchors [disabled]
-fsel-sched-pipelining [disabled]
-fsel-sched-pipelining-outer-loops [disabled]
-fsel-sched-reschedule-pipelined [disabled]
-fselective-scheduling [disabled]
-fselective-scheduling2 [disabled]
-fshort-double [disabled]
-fshort-enums [enabled]
-fshort-wchar [disabled]
-fshrink-wrap [enabled]
-fsignaling-nans [disabled]
-fsigned-zeros [enabled]
-fsingle-precision-constant [disabled]
-fsplit-ivs-in-unroller [enabled]
-fsplit-wide-types [enabled]
-fstack-check=[no|generic|specific]
-fstack-clash-protection [disabled]
-fstrict-aliasing [disabled]
-fstrict-enums [disabled]
-fthread-jumps [disabled]
-fno-threadsafe-statics [enabled]
-ftoplevel-reorder [enabled]
-ftrapping-math [enabled]
-ftrapv [disabled]
-ftree-bit-ccp [enabled]
-ftree-builtin-call-dce [disabled]
-ftree-ccp [enabled]
-ftree-ch [enabled]
-ftree-coalesce-inlined-vars [disabled]
-ftree-coalesce-vars [enabled]
-ftree-copy-prop [enabled]
-ftree-copyrename [enabled]
-ftree-cselim [enabled]
-ftree-dce [enabled]
-ftree-dominator-opts [enabled]
-ftree-dse [enabled]
-ftree-forwprop [enabled]
-ftree-fre [enabled]
-ftree-loop-distribute-patterns [disabled]
-ftree-loop-distribution [disabled]
-ftree-loop-if-convert [enabled]
-ftree-loop-if-convert-stores [disabled]
-ftree-loop-im [enabled]
-ftree-loop-ivcanon [enabled]
-ftree-loop-optimize [enabled]
-ftree-lrs [disabled]
-ftree-partial-pre [disabled]
-ftree-phiprop [enabled]
-ftree-pre [disabled]
-ftree-pta [enabled]
-ftree-reassoc [enabled]
-ftree-scev-cprop [enabled]
-ftree-sink [enabled]
-ftree-slp-vectorize [enabled]
-ftree-slsr [enabled]
-ftree-sra [enabled]
-ftree-switch-conversion [disabled]
-ftree-tail-merge [disabled]
-ftree-ter [enabled]
-ftree-vect-loop-version [enabled]
-ftree-vectorize [disabled]
-ftree-vrp [disabled]
-funit-at-a-time [enabled]
-funroll-all-loops [disabled]
-funroll-loops [disabled]
-funsafe-loop-optimizations [disabled]
-funsafe-math-optimizations [disabled]
-funswitch-loops [disabled]
-funwind-tables [disabled]
-fvar-tracking [enabled]
-fvar-tracking-assignments [enabled]
-fvar-tracking-assignments-toggle [disabled]
-fvar-tracking-uninit [disabled]
-fvariable-expansion-in-unroller [disabled]
-fvect-cost-model [disabled]
-fvpt [disabled]
-fweb [enabled]
-fwhole-program [disabled]
-fwrapv [disabled]
gcc -c -Q -O2 --help=optimizers
The following options control optimizations:
-O<number>
-Ofast
-Og
-Os
-faggressive-loop-optimizations [enabled]
-falign-functions [enabled]
-falign-jumps [enabled]
-falign-labels [enabled]
-falign-loops [enabled]
-fasynchronous-unwind-tables [enabled]
-fbranch-count-reg [enabled]
-fbranch-probabilities [disabled]
-fbranch-target-load-optimize [disabled]
-fbranch-target-load-optimize2 [disabled]
-fbtr-bb-exclusive [disabled]
-fcaller-saves [enabled]
-fcombine-stack-adjustments [enabled]
-fcommon [enabled]
-fcompare-elim [enabled]
-fconserve-stack [disabled]
-fcprop-registers [enabled]
-fcrossjumping [enabled]
-fcse-follow-jumps [enabled]
-fcx-fortran-rules [disabled]
-fcx-limited-range [disabled]
-fdata-sections [disabled]
-fdce [enabled]
-fdefer-pop [enabled]
-fdelayed-branch [disabled]
-fdelete-null-pointer-checks [enabled]
-fdevirtualize [enabled]
-fdse [enabled]
-fearly-inlining [enabled]
-fexceptions [disabled]
-fexpensive-optimizations [enabled]
-ffinite-math-only [disabled]
-ffloat-store [disabled]
-fforward-propagate [enabled]
-fgcse [enabled]
-fgcse-after-reload [disabled]
-fgcse-las [disabled]
-fgcse-lm [enabled]
-fgcse-sm [disabled]
-fgraphite-identity [disabled]
-fguess-branch-probability [enabled]
-fhandle-exceptions
-fhoist-adjacent-loads [enabled]
-fif-conversion [enabled]
-fif-conversion2 [enabled]
-finline [enabled]
-finline-atomics [enabled]
-finline-functions [disabled]
-finline-functions-called-once [enabled]
-finline-small-functions [enabled]
-fipa-cp [enabled]
-fipa-cp-clone [disabled]
-fipa-profile [enabled]
-fipa-pta [disabled]
-fipa-pure-const [enabled]
-fipa-reference [enabled]
-fipa-sra [enabled]
-fira-hoist-pressure [enabled]
-fivopts [enabled]
-fjump-tables [enabled]
-floop-block [disabled]
-floop-interchange [disabled]
-floop-nest-optimize [disabled]
-floop-parallelize-all [disabled]
-floop-strip-mine [disabled]
-fmath-errno [enabled]
-fmerge-all-constants [disabled]
-fmerge-constants [enabled]
-fmodulo-sched [disabled]
-fmove-loop-invariants [enabled]
-fnon-call-exceptions [disabled]
-fnothrow-opt [disabled]
-fomit-frame-pointer [disabled]
-fopt-info [disabled]
-foptimize-register-move [enabled]
-foptimize-sibling-calls [enabled]
-foptimize-strlen [enabled]
-fpack-struct [disabled]
-fpack-struct=<number>
-fpeel-loops [disabled]
-fpeephole [enabled]
-fpeephole2 [enabled]
-fpredictive-commoning [disabled]
-fprefetch-loop-arrays [enabled]
-freg-struct-return [disabled]
-fregmove [enabled]
-frename-registers [enabled]
-freorder-blocks [enabled]
-freorder-blocks-and-partition [disabled]
-freorder-functions [enabled]
-frerun-cse-after-loop [enabled]
-freschedule-modulo-scheduled-loops [disabled]
-frounding-math [disabled]
-frtti [enabled]
-fsched-critical-path-heuristic [enabled]
-fsched-dep-count-heuristic [enabled]
-fsched-group-heuristic [enabled]
-fsched-interblock [enabled]
-fsched-last-insn-heuristic [enabled]
-fsched-pressure [disabled]
-fsched-rank-heuristic [enabled]
-fsched-spec [enabled]
-fsched-spec-insn-heuristic [enabled]
-fsched-spec-load [disabled]
-fsched-spec-load-dangerous [disabled]
-fsched-stalled-insns [disabled]
-fsched-stalled-insns-dep [enabled]
-fsched2-use-superblocks [disabled]
-fschedule-insns [disabled]
-fschedule-insns2 [enabled]
-fsection-anchors [disabled]
-fsel-sched-pipelining [disabled]
-fsel-sched-pipelining-outer-loops [disabled]
-fsel-sched-reschedule-pipelined [disabled]
-fselective-scheduling [disabled]
-fselective-scheduling2 [disabled]
-fshort-double [disabled]
-fshort-enums [enabled]
-fshort-wchar [disabled]
-fshrink-wrap [enabled]
-fsignaling-nans [disabled]
-fsigned-zeros [enabled]
-fsingle-precision-constant [disabled]
-fsplit-ivs-in-unroller [enabled]
-fsplit-wide-types [enabled]
-fstack-check=[no|generic|specific]
-fstack-clash-protection [disabled]
-fstrict-aliasing [enabled]
-fstrict-enums [disabled]
-fthread-jumps [enabled]
-fno-threadsafe-statics [enabled]
-ftoplevel-reorder [enabled]
-ftrapping-math [enabled]
-ftrapv [disabled]
-ftree-bit-ccp [enabled]
-ftree-builtin-call-dce [enabled]
-ftree-ccp [enabled]
-ftree-ch [enabled]
-ftree-coalesce-inlined-vars [disabled]
-ftree-coalesce-vars [enabled]
-ftree-copy-prop [enabled]
-ftree-copyrename [enabled]
-ftree-cselim [enabled]
-ftree-dce [enabled]
-ftree-dominator-opts [enabled]
-ftree-dse [enabled]
-ftree-forwprop [enabled]
-ftree-fre [enabled]
-ftree-loop-distribute-patterns [disabled]
-ftree-loop-distribution [disabled]
-ftree-loop-if-convert [enabled]
-ftree-loop-if-convert-stores [disabled]
-ftree-loop-im [enabled]
-ftree-loop-ivcanon [enabled]
-ftree-loop-optimize [enabled]
-ftree-lrs [disabled]
-ftree-partial-pre [disabled]
-ftree-phiprop [enabled]
-ftree-pre [enabled]
-ftree-pta [enabled]
-ftree-reassoc [enabled]
-ftree-scev-cprop [enabled]
-ftree-sink [enabled]
-ftree-slp-vectorize [enabled]
-ftree-slsr [enabled]
-ftree-sra [enabled]
-ftree-switch-conversion [enabled]
-ftree-tail-merge [enabled]
-ftree-ter [enabled]
-ftree-vect-loop-version [enabled]
-ftree-vectorize [disabled]
-ftree-vrp [enabled]
-funit-at-a-time [enabled]
-funroll-all-loops [disabled]
-funroll-loops [disabled]
-funsafe-loop-optimizations [disabled]
-funsafe-math-optimizations [disabled]
-funswitch-loops [disabled]
-funwind-tables [disabled]
-fvar-tracking [enabled]
-fvar-tracking-assignments [enabled]
-fvar-tracking-assignments-toggle [disabled]
-fvar-tracking-uninit [disabled]
-fvariable-expansion-in-unroller [disabled]
-fvect-cost-model [disabled]
-fvpt [disabled]
-fweb [enabled]
-fwhole-program [disabled]
-fwrapv [disabled]