用过gcc的都应该知道编译时候的-O选项吧。它就是负责编译优化。
下面列出它的说明:
-O
-O1 Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a
large function.
With -O, the compiler tries to reduce code size and execution time, without performing any
optimizations that take a great deal of compilation time.
-O turns on the following optimization flags: -fdefer-pop -fdelayed-branch
-fguess-branch-probability -fcprop-registers -floop-optimize -fif-conversion -fif-conver-
sion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs
-ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants
温馨提示:答案为网友推荐,仅供参考