This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What optimizations does -O1 enable?
- From: Andreas Schwab <schwab at suse dot de>
- To: Will Newton <will at debian dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 12 Mar 2003 18:11:01 +0100
- Subject: Re: What optimizations does -O1 enable?
- References: <200303121650.53527.will@debian.org>
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."