gcc -Q --help=optimizers -O1 >a.txt
The following options control optimizations:
-O<number>
-Os
-falign-functions [disabled]
-falign-jumps [disabled]
-falign-labels [disabled]
-falign-loops [enabled]
-fargument-alias [enabled]
-fargument-noalias [disabled]
-fargument-noalias-anything [disabled]
-fargument-noalias-global [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]
-fcommon [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]
-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
-fif-conversion [enabled]
-fif-conversion2 [enabled]
-finline-functions [disabled]
-finline-functions-called-once [enabled]
-finline-small-functions [disabled]
-fipa-cp [disabled]
-fipa-cp-clone [disabled]
-fipa-matrix-reorg [disabled]
-fipa-pta [disabled]
-fipa-pure-const [enabled]
-fipa-reference [enabled]
-fipa-sra [disabled]
-fipa-type-escape [disabled]
-fivopts [enabled]
-fjump-tables [enabled]
-floop-block [disabled]
-floop-interchange [disabled]
-floop-parallelize-all [disabled]
-floop-strip-mine [disabled]
-flto-report [disabled]
-fltrans [disabled]
-fmath-errno [enabled]
-fmerge-all-constants [disabled]
-fmerge-constants [enabled]
-fmodulo-sched [disabled]
-fmove-loop-invariants [enabled]
-fnon-call-exceptions [disabled]
-fomit-frame-pointer [enabled]
-foptimize-register-move [disabled]
-foptimize-sibling-calls [disabled]
-fpack-struct [disabled]
-fpack-struct=<number>
-fpeel-loops [disabled]
-fpeephole [enabled]
-fpeephole2 [disabled]
-fpredictive-commoning [disabled]
-fprefetch-loop-arrays [disabled]
-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
-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]
-fset-stack-executable [enabled]
-fshort-double
-fshort-enums
-fshort-wchar
-fsignaling-nans [disabled]
-fsigned-zeros [enabled]
-fsingle-precision-constant [disabled]
-fsplit-ivs-in-unroller [enabled]
-fsplit-wide-types [enabled]
-fstrict-aliasing [disabled]
-fthread-jumps [disabled]
-fno-threadsafe-statics
-ftoplevel-reorder [enabled]
-ftrapping-math [enabled]
-ftrapv [disabled]
-ftree-builtin-call-dce [disabled]
-ftree-ccp [enabled]
-ftree-ch [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-distribution [disabled]
-ftree-loop-im [enabled]
-ftree-loop-ivcanon [enabled]
-ftree-loop-linear [disabled]
-ftree-loop-optimize [enabled]
-ftree-lrs [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-sra [enabled]
-ftree-switch-conversion [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 [enabled]
-fvpt [disabled]
-fweb [enabled]
-fwhole-program [disabled]
-fwpa [disabled]
-fwrapv [disabled]
查看GCC支持的机型:gcc -Q --target-help >b.txt