This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What optimizations does -O1 enable?


Will Newton <will at debian dot org> writes:

|> I have some code[1] that breaks when compiled with gcc 3.2 -O1. I have tried 
|> enabling all these optimizations:
|> 
|> CFLAGS = -g -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  
|> -fomit-frame-pointer -Wno-sign-compare -DUNICODE -DDYNAMIC_FFI -DNO_SIGSEGV 
|> -falign-functions=4 -fstrength-reduce -fno-keep-static-consts -fthread-jumps 
|> -fcse-follow-jumps -fdelete-null-pointer-checks -fdefer-pop -fschedule-insns 
|> -fmerge-constants -fbranch-count-reg -frerun-cse-after-loop -frerun-loop-opt 
|> -fgcse -foptimize-register-move -fschedule-insns2 -fsched-spec-load 
|> -fcaller-saves -fguess-branch-probability -fstrict-aliasing 
|> -frename-registers -freduce-all-givs  -fmove-all-movables 
|> -fexpensive-optimizations -fasynchronous-unwind-tables

There are parts in the compiler that test for optimize > 0.  These won't
be enabled unless you pass -O1.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]