>arm-none-eabi-gcc --help=optimizers
>arm-none-eabi-gcc --help=optimizers
>arm-none-eabi-gcc --help=optimizers The following options control optimizations: -O<number> Set optimization level to <number>. -Ofast Optimize for speed disregarding exact standards compliance. -Og Optimize for debugging experience rather than speed or size. -Os Optimize for space rather than speed. -faggressive-loop-optimizations Aggressively optimize loops using language constraints. -falign-functions Align the start of functions. -falign-jumps Align labels which are only reached by jumping. -falign-labels Align all labels. -falign-loops Align the start of loops. -fassociative-math Allow optimization for floating-point arithmetic which may change the result of the operation due to rounding. -fasynchronous-unwind-tables Generate unwind tables that are exact at each instruction boundary. -fauto-inc-dec Generate auto-inc/dec instructions. -fbranch-count-reg Replace add, compare, branch with branch on count register. -fbranch-probabilities Use profiling information for branch probabilities. -fbranch-target-load-optimize Perform branch target load optimization before prologue / epilogue threading. -fbranch-target-load-optimize2 Perform branch target load optimization after prologue / epilogue threading. -fbtr-bb-exclusive Restrict target load migration not to re-use registers in any basic block. -fcaller-saves Save registers around function calls. -fcombine-stack-adjustments Looks for opportunities to reduce stack adjustments and stack references. -fcompare-elim Perform comparison elimination after register allocation has finished. -fconserve-stack Do not perform optimizations increasing noticeably stack usage. -fcprop-registers Perform a register copy-propagation optimization pass. -fcrossjumping Perform cross-jumping optimization. -fcse-follow-jumps When running CSE, follow jumps to their targets. -fcx-fortran-rules Complex multiplication and division follow Fortran rules. -fcx-limited-range Omit range reduction step when performing complex division. -fdce Use the RTL dead code elimination pass. -fdefer-pop Defer popping functions args from stack until later. -fdelayed-branch Attempt to fill delay slots of branch instructions. -fdelete-dead-exceptions Delete dead instructions that may throw exceptions. -fdelete-null-pointer-checks Delete useless null pointer checks. -fdevirtualize Try to convert virtual calls to direct ones. -fdevirtualize-speculatively Perform speculative devirtualization. -fdse Use the RTL dead store elimination pass. -fearly-inlining Perform early inlining. -fexceptions Enable exception handling. -fexpensive-optimizations Perform a number of minor, expensive optimizations. -ffinite-math-only Assume no NaNs or infinities are generated. -ffloat-store Don't allocate floats and doubles in extended- precision registers. -fforward-propagate Perform a forward propagation pass on RTL. -ffp-contract= -ffp-contract=[off|on|fast] Perform floating- point expression contraction. -ffunction-cse Allow function addresses to be held in registers. -fgcse Perform global common subexpression elimination. -fgcse-after-reload Perform global common subexpression elimination after register allocation has finished. -fgcse-las Perform redundant load after store elimination in global common subexpression elimination. -fgcse-lm Perform enhanced load motion during global common subexpression elimination. -fgcse-sm Perform store motion after global common subexpression elimination. -fgraphite Enable in and out of Graphite representation. -fgraphite-identity Enable Graphite Identity transformation. -fguess-branch-probability Enable guessing of branch probabilities. -fhandle-exceptions Same as -fexceptions. Use the latter option instead. Uses of this option are diagnosed. -fhoist-adjacent-loads Enable hoisting adjacent loads to encourage generating conditional move instructions. -fif-conversion Perform conversion of conditional jumps to branchless equivalents. -fif-conversion2 Perform conversion of conditional jumps to conditional execution. -findirect-inlining Perform indirect inlining. -finline Enable inlining of function declared "inline", disabling disables all inlining. -finline-atomics Inline __atomic operations when a lock free instruction sequence is available. -finline-functions Integrate functions not declared "inline" into their callers when profitable. -finline-functions-called-once Integrate functions only required by their single caller. -finline-small-functions Integrate functions into their callers when code size is known not to grow. -fipa-cp Perform interprocedural constant propagation. -fipa-cp-alignment Perform alignment discovery and propagation to make Interprocedural constant propagation stronger. -fipa-cp-clone Perform cloning to make Interprocedural constant propagation stronger. -fipa-icf Perform Identical Code Folding for functions and read-only variables. -fipa-icf-functions Perform Identical Code Folding for functions. -fipa-profile Perform interprocedural profile propagation. -fipa-pta Perform interprocedural points-to analysis. -fipa-pure-const Discover pure and const functions. -fipa-ra Use caller save register across calls if possible. -fipa-reference Discover readonly and non addressable static variables. -fipa-sra Perform interprocedural reduction of aggregates. -fira-algorithm= -fira-algorithm=[CB|priority] Set the used IRA algorithm. -fira-hoist-pressure Use IRA based register pressure calculation in RTL hoist optimizations. -fira-loop-pressure Use IRA based register pressure calculation in RTL loop optimizations. -fira-region= -fira-region=[one|all|mixed] Set regions for IRA. -fira-share-save-slots Share slots for saving different hard registers. -fira-share-spill-slots Share stack slots for spilled pseudo-registers. -fisolate-erroneous-paths-attribute Detect paths that trigger erroneous or undefined behavior due a null value being used in a way forbidden by a returns_nonnull or nonnull attribute. Isolate those paths from the main control flow and turn the statement with erroneous or undefined behavior into a trap. -fisolate-erroneous-paths-dereference Detect paths that trigger erroneous or undefined behavior due to dereferencing a null pointer. Isolate those paths from the main control flow and turn the statement with erroneous or undefined behavior into a trap. -fivopts Optimize induction variables on trees. -fjump-tables Use jump tables for sufficiently large switch statements. -fkeep-gc-roots-live This option lacks documentation. -flifetime-dse Tell DSE that the storage for a C++ object is dead when the constructor starts and when the destructor finishes. -flifetime-dse= This option lacks documentation. -flive-range-shrinkage Relief of register pressure through live range shrinkage. -floop-nest-optimize Enable the loop nest optimizer. -floop-parallelize-all Mark all loops as parallel. -flra-remat Do CFG-sensitive rematerialization in LRA. -fmath-errno Set errno after built-in math functions. -fmodulo-sched Perform SMS based modulo scheduling before the first scheduling pass. -fmodulo-sched-allow-regmoves Perform SMS based modulo scheduling with register moves allowed. -fmove-loop-invariants Move loop invariant computations out of loops. -fnon-call-exceptions Support synchronous non-call exceptions. -fnothrow-opt Treat a throw() exception specification as noexcept to improve code size. -fomit-frame-pointer When possible do not generate stack frames. -fopt-info Enable all optimization info dumps on stderr. -foptimize-sibling-calls Optimize sibling and tail recursive calls. -foptimize-strlen Enable string length optimizations on trees. -fpack-struct Pack structure members together without holes. -fpack-struct=<number> Set initial maximum structure member alignment. -fpartial-inlining Perform partial inlining. -fpeel-loops Perform loop peeling. -fpeephole Enable machine specific peephole optimizations. -fpeephole2 Enable an RTL peephole pass before sched2. -fplt Use PLT for PIC calls (-fno-plt: load the address from GOT at call site). -fpredictive-commoning Run predictive commoning optimization. -fprefetch-loop-arrays Generate prefetch instructions, if available, for arrays in loops. -freciprocal-math Same as -fassociative-math for expressions which include division. -freg-struct-return Return small aggregates in registers. -frename-registers Perform a register renaming optimization pass. -freorder-blocks Reorder basic blocks to improve code placement. -freorder-blocks-algorithm= -freorder-blocks-algorithm=[simple|stc] Set the used basic block reordering algorithm. -freorder-blocks-and-partition Reorder basic blocks and partition into hot and cold sections. -freorder-functions Reorder functions to improve code placement. -frerun-cse-after-loop Add a common subexpression elimination pass after loop optimizations. -freschedule-modulo-scheduled-loops Enable/Disable the traditional scheduling in loops that already passed modulo scheduling. -frounding-math Disable optimizations that assume default FP rounding behavior. -frtti Generate run time type descriptor information. -fsched-critical-path-heuristic Enable the critical path heuristic in the scheduler. -fsched-dep-count-heuristic Enable the dependent count heuristic in the scheduler. -fsched-group-heuristic Enable the group heuristic in the scheduler. -fsched-interblock Enable scheduling across basic blocks. -fsched-last-insn-heuristic Enable the last instruction heuristic in the scheduler. -fsched-pressure Enable register pressure sensitive insn scheduling. -fsched-rank-heuristic Enable the rank heuristic in the scheduler. -fsched-spec Allow speculative motion of non-loads. -fsched-spec-insn-heuristic Enable the speculative instruction heuristic in the scheduler. -fsched-spec-load Allow speculative motion of some loads. -fsched-spec-load-dangerous Allow speculative motion of more loads. -fsched-stalled-insns Allow premature scheduling of queued insns. -fsched-stalled-insns-dep Set dependence distance checking in premature scheduling of queued insns. -fsched-stalled-insns-dep=<number> Set dependence distance checking in premature scheduling of queued insns. -fsched-stalled-insns=<number> Set number of queued insns that can be prematurely scheduled. -fsched2-use-superblocks If scheduling post reload, do superblock scheduling. -fschedule-fusion Perform a target dependent instruction fusion optimization pass. -fschedule-insns Reschedule instructions before register allocation. -fschedule-insns2 Reschedule instructions after register allocation. -fsection-anchors Access data in the same section from shared anchor points. -fsel-sched-pipelining Perform software pipelining of inner loops during selective scheduling. -fsel-sched-pipelining-outer-loops Perform software pipelining of outer loops during selective scheduling. -fsel-sched-reschedule-pipelined Reschedule pipelined regions without pipelining. -fselective-scheduling Schedule instructions using selective scheduling algorithm. -fselective-scheduling2 Run selective scheduling after reload. -fshort-enums Use the narrowest integer type possible for enumeration types. -fshort-wchar Force the underlying type for "wchar_t" to be "unsigned short". -fshrink-wrap Emit function prologues only before parts of the function that need it, rather than at the top of the function. -fsignaling-nans Disable optimizations observable by IEEE signaling NaNs. -fsigned-zeros Disable floating point optimizations that ignore the IEEE signedness of zero. -fsimd-cost-model= Specifies the vectorization cost model for code marked with a simd directive. -fsingle-precision-constant Convert floating point constants to single precision constants. -fsplit-ivs-in-unroller Split lifetimes of induction variables when loops are unrolled. -fsplit-paths Split paths leading to loop backedges. -fsplit-wide-types Split wide types into independent registers. -fssa-backprop Enable backward propagation of use properties at the SSA level. -fssa-phiopt Optimize conditional patterns using SSA PHI nodes. -fstack-reuse= -fstack-reuse=[all|named_vars|none] Set stack reuse level for local variables. -fstdarg-opt Optimize amount of stdarg registers saved to stack at start of function. -fstrict-aliasing Assume strict aliasing rules apply. -fstrict-enums Assume that values of enumeration type are always within the minimum range of that type. -fstrict-overflow Treat signed overflow as undefined. -fstrict-volatile-bitfields Force bitfield accesses to match their type width. -fthread-jumps Perform jump threading optimizations. -fno-threadsafe-statics Do not generate thread-safe code for initializing local statics. -ftracer Perform superblock formation via tail duplication. -ftrapping-math Assume floating-point operations can trap. -ftrapv Trap for signed overflow in addition, subtraction and multiplication. -ftree-bit-ccp Enable SSA-BIT-CCP optimization on trees. -ftree-builtin-call-dce Enable conditional dead code elimination for builtin calls. -ftree-ccp Enable SSA-CCP optimization on trees. -ftree-ch Enable loop header copying on trees. -ftree-coalesce-vars Enable SSA coalescing of user variables. -ftree-copy-prop Enable copy propagation on trees. -ftree-cselim Transform condition stores into unconditional ones. -ftree-dce Enable SSA dead code elimination optimization on trees. -ftree-dominator-opts Enable dominator optimizations. -ftree-dse Enable dead store elimination. -ftree-forwprop Enable forward propagation on trees. -ftree-fre Enable Full Redundancy Elimination (FRE) on trees. -ftree-loop-distribute-patterns Enable loop distribution for patterns transformed into a library call. -ftree-loop-distribution Enable loop distribution on trees. -ftree-loop-if-convert Convert conditional jumps in innermost loops to branchless equivalents. -ftree-loop-if-convert-stores Also if-convert conditional jumps containing memory writes. -ftree-loop-im Enable loop invariant motion on trees. -ftree-loop-ivcanon Create canonical induction variables in loops. -ftree-loop-optimize Enable loop optimizations on tree level. -ftree-loop-vectorize Enable loop vectorization on trees. -ftree-lrs Perform live range splitting during the SSA- >normal pass. -ftree-parallelize-loops= Enable automatic parallelization of loops. -ftree-partial-pre In SSA-PRE optimization on trees, enable partial- partial redundancy elimination. -ftree-phiprop Enable hoisting loads from conditional pointers. -ftree-pre Enable SSA-PRE optimization on trees. -ftree-pta Perform function-local points-to analysis on trees. -ftree-reassoc Enable reassociation on tree level. -ftree-scev-cprop Enable copy propagation of scalar-evolution information. -ftree-sink Enable SSA code sinking on trees. -ftree-slp-vectorize Enable basic block vectorization (SLP) on trees. -ftree-slsr Perform straight-line strength reduction. -ftree-sra Perform scalar replacement of aggregates. -ftree-switch-conversion Perform conversions of switch initializations. -ftree-tail-merge Enable tail merging on trees. -ftree-ter Replace temporary expressions in the SSA->normal pass. -ftree-vectorize Enable vectorization on trees. -ftree-vrp Perform Value Range Propagation on trees. -funconstrained-commons Assume common declarations may be overridden with ones with a larger trailing array. -funroll-all-loops Perform loop unrolling for all loops. -funroll-loops Perform loop unrolling when iteration count is known. -funsafe-loop-optimizations Allow loop optimizations to assume that the loops behave in normal way. -funsafe-math-optimizations Allow math optimizations that may violate IEEE or ISO standards. -funswitch-loops Perform loop unswitching. -funwind-tables Just generate unwind tables for exception handling. -fvar-tracking Perform variable tracking. -fvar-tracking-assignments Perform variable tracking by annotating assignments. -fvar-tracking-assignments-toggle Toggle -fvar-tracking-assignments. -fvar-tracking-uninit Perform variable tracking and also tag variables that are uninitialized. -fvariable-expansion-in-unroller Apply variable expansion when loops are unrolled. -fvect-cost-model= Specifies the cost model for vectorization. -fvpt Use expression value profiles in optimizations. -fweb Construct webs and split unrelated uses of single variable. -fwrapv Assume signed arithmetic overflow wraps around.