⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 optimize-options.html

📁 自己收集的linux入门到学懂高级编程书集 包括linux程序设计第三版
💻 HTML
📖 第 1 页 / 共 5 页
字号:
abstract measurement of function's size.  In no way, it represents a countof assembly instructions and as such its exact meaning might change from onerelease to an another.     <br><dt><code>-fkeep-inline-functions</code>     <dd>Even if all calls to a given function are integrated, and the functionis declared <code>static</code>, nevertheless output a separate run-timecallable version of the function.  This switch does not affect<code>extern inline</code> functions.     <br><dt><code>-fkeep-static-consts</code>     <dd>Emit variables declared <code>static const</code> when optimization isn't turnedon, even if the variables aren't referenced.     <p>GCC enables this option by default.  If you want to force the compiler tocheck if the variable was referenced, regardless of whether or notoptimization is turned on, use the <code>-fno-keep-static-consts</code> option.     <br><dt><code>-fmerge-constants</code>     <dd>Attempt to merge identical constants (string constants and floating pointconstants) across compilation units.     <p>This option is the default for optimized compilation if the assembler andlinker support it.  Use <code>-fno-merge-constants</code> to inhibit thisbehavior.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fmerge-all-constants</code>     <dd>Attempt to merge identical constants and identical variables.     <p>This option implies <code>-fmerge-constants</code>.  In addition to<code>-fmerge-constants</code> this considers e.g. even constant initializedarrays or initialized constant variables with integral or floating pointtypes.  Languages like C or C++ require each non-automatic variable tohave distinct location, so using this option will result in non-conformingbehavior.     <br><dt><code>-fnew-ra</code>     <dd>Use a graph coloring register allocator.  Currently this option is meantonly for testing.  Users should not specify this option, since it is notyet ready for production use.     <br><dt><code>-fno-branch-count-reg</code>     <dd>Do not use "decrement and branch" instructions on a count register,but instead generate a sequence of instructions that decrement aregister, compare it against zero, then branch based upon the result. This option is only meaningful on architectures that support suchinstructions, which include x86, PowerPC, IA-64 and S/390.     <p>The default is <code>-fbranch-count-reg</code>, enabled when<code>-fstrength-reduce</code> is enabled.     <br><dt><code>-fno-function-cse</code>     <dd>Do not put function addresses in registers; make each instruction thatcalls a constant function contain the function's address explicitly.     <p>This option results in less efficient code, but some strange hacksthat alter the assembler output may be confused by the optimizationsperformed when this option is not used.     <p>The default is <code>-ffunction-cse</code>     <br><dt><code>-fno-zero-initialized-in-bss</code>     <dd>If the target supports a BSS section, GCC by default puts variables thatare initialized to zero into BSS.  This can save space in the resultingcode.     <p>This option turns off this behavior because some programs explicitlyrely on variables going to the data section.  E.g., so that theresulting executable can find the beginning of that section and/or makeassumptions based on that.     <p>The default is <code>-fzero-initialized-in-bss</code>.     <br><dt><code>-fstrength-reduce</code>     <dd>Perform the optimizations of loop strength reduction andelimination of iteration variables.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fthread-jumps</code>     <dd>Perform optimizations where we check to see if a jump branches to alocation where another comparison subsumed by the first is found.  Ifso, the first branch is redirected to either the destination of thesecond branch or a point immediately following it, depending on whetherthe condition is known to be true or false.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fcse-follow-jumps</code>     <dd>In common subexpression elimination, scan through jump instructionswhen the target of the jump is not reached by any other path.  Forexample, when CSE encounters an <code>if</code> statement with an<code>else</code> clause, CSE will follow the jump when the conditiontested is false.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fcse-skip-blocks</code>     <dd>This is similar to <code>-fcse-follow-jumps</code>, but causes CSE tofollow jumps which conditionally skip over blocks.  When CSEencounters a simple <code>if</code> statement with no else clause,<code>-fcse-skip-blocks</code> causes CSE to follow the jump around thebody of the <code>if</code>.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-frerun-cse-after-loop</code>     <dd>Re-run common subexpression elimination after loop optimizations has beenperformed.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-frerun-loop-opt</code>     <dd>Run the loop optimizer twice.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fgcse</code>     <dd>Perform a global common subexpression elimination pass. This pass also performs global constant and copy propagation.     <p><em>Note:</em> When compiling a program using computed gotos, a GCCextension, you may get better runtime performance if you disablethe global common subexpression elimination pass by adding<code>-fno-gcse</code> to the command line.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fgcse-lm</code>     <dd>When <code>-fgcse-lm</code> is enabled, global common subexpression elimination willattempt to move loads which are only killed by stores into themselves.  Thisallows a loop containing a load/store sequence to be changed to a load outsidethe loop, and a copy/store within the loop.     <p>Enabled by default when gcse is enabled.     <br><dt><code>-fgcse-sm</code>     <dd>When <code>-fgcse-sm</code> is enabled, a store motion pass is run afterglobal common subexpression elimination.  This pass will attempt to movestores out of loops.  When used in conjunction with <code>-fgcse-lm</code>,loops containing a load/store sequence can be changed to a load beforethe loop and a store after the loop.     <p>Enabled by default when gcse is enabled.     <br><dt><code>-fgcse-las</code>     <dd>When <code>-fgcse-las</code> is enabled, the global common subexpressionelimination pass eliminates redundant loads that come after stores to thesame memory location (both partial and full redundancies).     <p>Enabled by default when gcse is enabled.     <br><dt><code>-floop-optimize</code>     <dd>Perform loop optimizations: move constant expressions out of loops, simplifyexit test conditions and optionally do strength-reduction and loop unrolling aswell.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fcrossjumping</code>     <dd>Perform cross-jumping transformation. This transformation unifies equivalent code and save code size. Theresulting code may or may not perform better than without cross-jumping.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fif-conversion</code>     <dd>Attempt to transform conditional jumps into branch-less equivalents.  Thisinclude use of conditional moves, min, max, set flags and abs instructions, andsome tricks doable by standard arithmetics.  The use of conditional executionon chips where it is available is controlled by <code>if-conversion2</code>.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fif-conversion2</code>     <dd>Use conditional execution (where available) to transform conditional jumps intobranch-less equivalents.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fdelete-null-pointer-checks</code>     <dd>Use global dataflow analysis to identify and eliminate useless checksfor null pointers.  The compiler assumes that dereferencing a nullpointer would have halted the program.  If a pointer is checked afterit has already been dereferenced, it cannot be null.     <p>In some environments, this assumption is not true, and programs cansafely dereference null pointers.  Use<code>-fno-delete-null-pointer-checks</code> to disable this optimizationfor programs which depend on that behavior.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fexpensive-optimizations</code>     <dd>Perform a number of minor optimizations that are relatively expensive.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-foptimize-register-move</code>     <dd><dt><code>-fregmove</code>     <dd>Attempt to reassign register numbers in move instructions and asoperands of other simple instructions in order to maximize the amount ofregister tying.  This is especially helpful on machines with two-operandinstructions.     <p>Note <code>-fregmove</code> and <code>-foptimize-register-move</code> are the sameoptimization.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fdelayed-branch</code>     <dd>If supported for the target machine, attempt to reorder instructionsto exploit instruction slots available after delayed branchinstructions.     <p>Enabled at levels <code>-O</code>, <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fschedule-insns</code>     <dd>If supported for the target machine, attempt to reorder instructions toeliminate execution stalls due to required data being unavailable.  Thishelps machines that have slow floating point or memory load instructionsby allowing other instructions to be issued until the result of the loador floating point instruction is required.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fschedule-insns2</code>     <dd>Similar to <code>-fschedule-insns</code>, but requests an additional pass ofinstruction scheduling after register allocation has been done.  This isespecially useful on machines with a relatively small number ofregisters and where memory load instructions take more than one cycle.     <p>Enabled at levels <code>-O2</code>, <code>-O3</code>, <code>-Os</code>.     <br><dt><code>-fno-sched-interblock</code>     <dd>Don't schedule instructions across basic blocks.  This is normallyenabled by default when scheduling before register allocation, i.e. with <code>-fschedule-insns</code> or at <code>-O2</code> or higher.     <br><dt><code>-fno-sched-spec</code>     <dd>Don't allow speculative motion of non-load instructions.  This is normallyenabled by default when scheduling before register allocation, i.e. with <code>-fschedule-insns</code> or at <code>-O2</code> or higher.     <br><dt><code>-fsched-spec-load</code>     <dd>Allow speculative motion of some load instructions.  This only makessense when scheduling before register allocation, i.e. with<code>-fschedule-insns</code> or at <code>-O2</code> or higher.     <br><dt><code>-fsched-spec-load-dangerous</code>     <dd>Allow speculative motion of more load instructions.  This only makessense when scheduling before register allocation, i.e. with<code>-fschedule-insns</code> or at <code>-O2</code> or higher.     <br><dt><code>-fsched-stalled-insns=</code><var>n</var><code></code>     <dd>Define how many insns (if any) can be moved prematurely from the queueof stalled insns into the ready list, during the second scheduling pass.     <br><dt><code>-fsched-stalled-insns-dep=</code><var>n</var><code></code>     <dd>Define how many insn groups (cycles) will be examined for a dependencyon a stalled insn that is candidate for premature removal from the queueof stalled insns.  Has an effect only during the second scheduling pass,and only if <code>-fsched-stalled-insns</code> is used and its value is not zero.     <br><dt><code>-fsched2-use-superblocks</code>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -