Re: How to dump all the optimization flags enabled?

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

 





Andrew Haley wrote:
Wei Hu writes:
 > Hello,
> > Is there a way to tell gcc to print out all the effective optimization
 > flags when it compiles a C file?
 > I know the manual tells you what flags are set at different
 > optimization levels, but I'm still looking for an answer to my
 > question because it will be useful to my project.

Yes.  -fverbose-asm dumps the flags to the .s file.

Andrew.

Hi,

Sorry, if probably a bit offtopic from subj.

I've created flags lists for -O0 and -O2,
made diff (see attach) and built my project
both with -O0 and -O2 -fno-{all options marked by + in diff}.

I've expected that results(binaries) will be equal.
But they are different.

Are my expectations correct?
Or -O0 and -O2 -fno-{all options marked
by + in diff} are not the same?

Regards
Vladimir
--- O0.opts	2007-03-29 15:26:29.703125000 +0400
+++ O2.opts	2007-03-29 15:24:56.250000000 +0400
@@ -1,33 +1,78 @@
 -falign-loops
 -fargument-alias
 -fbranch-count-reg
+-fcaller-saves
 -fcommon
+-fcprop-registers
+-fcrossjumping
+-fcse-follow-jumps
+-fcse-skip-blocks
 -fdata-sections
+-fdefer-pop
+-fdelete-null-pointer-checks
 -fearly-inlining
 -feliminate-unused-debug-types
 -fexceptions
+-fexpensive-optimizations
 -ffunction-cse
 -ffunction-sections
+-fgcse
 -fgcse-lm
+-fguess-branch-probability
 -fident
+-fif-conversion
+-fif-conversion2
 -finline-functions-called-once
+-fipa-pure-const
+-fipa-reference
+-fipa-type-escape
 -fivopts
 -fkeep-static-consts
 -fleading-underscore
+-floop-optimize
 -floop-optimize2
 -fmath-errno
+-fmerge-constants
+-foptimize-register-move
+-foptimize-sibling-calls
 -fpcc-struct-return
 -fpeephole
+-fpeephole2
+-fregmove
+-freorder-blocks
+-freorder-functions
+-frerun-cse-after-loop
+-frerun-loop-opt
 -fsched-interblock
 -fsched-spec
 -fsched-stalled-insns-dep
+-fschedule-insns2
 -fshow-column
 -fsplit-ivs-in-unroller
+-fstrength-reduce
+-fstrict-aliasing
+-fthread-jumps
 -ftrapping-math
+-ftree-ccp
+-ftree-ch
+-ftree-copy-prop
+-ftree-copyrename
+-ftree-dce
+-ftree-dominator-opts
+-ftree-dse
+-ftree-fre
 -ftree-loop-im
 -ftree-loop-ivcanon
 -ftree-loop-optimize
+-ftree-lrs
+-ftree-pre
+-ftree-salias
+-ftree-sink
+-ftree-store-ccp
+-ftree-store-copy-prop
+-ftree-ter
 -ftree-vect-loop-version
+-ftree-vrp
 -funit-at-a-time
 -fverbose-asm
 -fzero-initialized-in-bss

[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