Re: In GCC 10.2, -O2 optimization enables more than docs suggest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/20/21 10:50 AM, Jonathan Wakely wrote:

That's a different situation though. With -O0 **NO** optimization is done,
at all. Any -f options for optimization passes are ignored entirely.

The difference between -O1 and -O2 is the set of -f flags that differ, and
some specific checks for >= -O2. But the difference between -O0 and -O1 is
the difference between zero and non-zero. Completely off, or on.


That's interesting, Jonathan. You know far better than I do, and I haven't tried it in over a year (on an older version of GCC-ARM), but I swore the following did do something:

    OPTIMIZE_FLAG := -O0 \
		     -fbranch-count-reg \
		     -fcombine-stack-adjustments \
		     -fcompare-elim \
		     -fcprop-registers \
		     -fdefer-pop \
		     -fforward-propagate \
		     -fguess-branch-probability \
		     -fif-conversion \
		     -fif-conversion2 \
		     -finline \
		     -finline-functions-called-once \
		     -fipa-profile \
		     -fipa-pure-const \
		     -fipa-reference \
		     -fmerge-constants \
		     -fmove-loop-invariants \
		     -fomit-frame-pointer \
		     -freorder-blocks \
		     -fsched-pressure \
		     -fsection-anchors \
		     -fshrink-wrap \
		     -fsplit-wide-types \
		     -fssa-phiopt \
		     -ftoplevel-reorder \
		     -ftree-bit-ccp \
		     -ftree-builtin-call-dce \
		     -ftree-ccp \
		     -ftree-ch \
		     -ftree-coalesce-vars \
		     -ftree-copy-prop \
		     -ftree-dce \
		     -ftree-dominator-opts \
		     -ftree-dse \
		     -ftree-fre \
		     -ftree-pta \
		     -ftree-sink \
		     -ftree-slsr \
		     -ftree-sra \
		     -ftree-ter \
		     -fvar-tracking \
		     -fvar-tracking-assignments

Maybe because you said "optimization passes"? The ones above (or some of them) are for other passes?

--
MARK
markrubn@xxxxxxxxx



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux