函数内联(Function Inlining):将函数调用处直接替换为函数体,减少函数调用的开销。 循环优化(Loop Optimization):改变循环结构,减少循环次数或提前退出循环,优化循环执行效率。 寄存器分配(Register Allocation):将变量存储在寄存器中,减少对内存的访问开销。 gcc提供了从 O0-O3 以及 Os 这几种不
#include "tree-ssa-loop-niter.h" #include "loop-unroll.h" #include "tree-scalar-evolution.h"/* Apply FLAGS to the loop state. */static void apply_loop_flags (unsigned flags) { if (flags & LOOPS_MAY_HAVE_MULTIPLE_LATCHES) {
no_unroll Disable loop unrolling --no_var_align Turn off the alignment optimization for variables --no_warnings Disable generation of warnings --no_wrap_diagnostics Don't wrap long lines in diagnostic messages -O[n|l|m|h|hs|hz] Select level of optimization: n No optimizations l Low ...
superblocks -fsched2-use-traces -fsignaling-nans -fsingle-precision-constant -fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps -funroll-all-loops -funroll-loops -fpeel-loops -funswitch-loops -fold-unroll-loops -fold-unroll-all-loops --param name=value -O -O0 -O1 -O2 -O3 -...
loop-unroll.h lower-subreg.c lower-subreg.h lra-assigns.c lra-coalesce.c lra-constraints.c lra-eliminations.c lra-int.h lra-lives.c lra-remat.c lra-spills.c lra.c lra.h lto-cgraph.c lto-compress.c lto-compress.h lto-opts.c lto-section-in.c lto-section-names.h lto-section-o...
-fforce-classes-archive-check 总是检查非 gcj 生成的类文档 -fhash-synchronization 假定运行时使用一张散列表完成从对象到其同步结构的映射 -findirect-classes 在运行时生成类的实例 -findirect-dispatch 为虚方法调用使用偏移表 -finline-functions Integrate functions not declared "inline" into ...
Common Var(flag_unroll_all_loops) Optimization Perform loop unrolling for all loops. funroll-completely-grow-size Undocumented Var(flag_cunroll_grow_size) Optimization ; Internal undocumented flag, allow size growth during complete unrolling ; Nonzero means that loop optimizer may assume that...
0063-LoongArch-Vectorized-loop-unroll... 0064-LoongArch-Fix-lsx-vshuf.c-and-la... 0065-LoongArch-Fix-ICE-and-use-simpli... 0066-LoongArch-Fix-eh_return-epilogue... 0067-LoongArch-Allow-mcmodel-extreme-... 0068-LoongArch-Fix-warnings-building-... 0069-LoongArch-testsuite-Remove-XFAIL... ...
gcc 文档 [root@rockylinux docs]# man gcc GCC(1) GNU GCC(1) NAME gcc - GNU project C and C++ compiler SYNOPSIS gcc [-c|-S|-E] [-std=standard] [-g] [-pg]
unroll-and-jam -floop-nest-optimize -floop-parallelize-all -flra-remat -flto -flto-compression-level -flto-partition=alg -fmerge-all-constants -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves -fmove-loop-invariants -fno-branch-count-reg -fno-defer-pop -fno-fp-int-builtin-...