Re: -O1 single optimization parameter

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

 



On Wed, Oct 8, 2008 at 6:15 PM, Andrew Haley <aph@xxxxxxxxxx> wrote:
>> so in gcc command line I have replaced -O1 with all these parameters,
>> but I obtain a larger binary and a worst stack usage. Is the same
>> thing of -O0.
>> How can I reproduce -O1 behaviour using simple command line parameter?
>
> You can't have optimization without -O.
I tried two different build
one witch -O0
and the second with
-O1
-fno-defer-pop
-fno-delayed-branch
-fno-guess-branch-probability
-fno-cprop-registers
-fno-if-conversion
-fno-if-conversion2
-fno-tree-ccp
-fno-tree-dce
-fno-tree-dominator-opts
-fno-tree-dse
-fno-tree-ter
-fno-tree-lrs
-fno-tree-sra
-fno-tree-copyrename
-fno-tree-fre
-fno-tree-ch
-fno-unit-at-a-time
-fno-merge-constants
-fno-ipa-pure-const
-fno-ipa-reference
-fno-omit-frame-pointer
-fno-tree-copy-prop
-fno-tree-salias
-fno-tree-sink
-fno-var-tracking

to reproduce the -O0 behaviour

from .lst files in both cases I can read:

options enabled:  -falign-loops -fargument-alias -fbranch-count-reg
-fcommon -fdata-sections -fearly-inlining -feliminate-unused-debug-types
-ffunction-cse -ffunction-sections -fgcse-lm -fident
-finline-functions-called-once -fivopts -fkeep-static-consts
-fleading-underscore -fmath-errno -fmove-loop-invariants -fpeephole
-freg-struct-return -fsched-interblock -fsched-spec
-fsched-stalled-insns-dep -fshow-column -fsplit-ivs-in-unroller
-ftoplevel-reorder -ftrapping-math -ftree-loop-im -ftree-loop-ivcanon
-ftree-loop-optimize -ftree-vect-loop-version -fverbose-asm
-fzero-initialized-in-bss -mlittle-endian -msched-prolog

but when I compile with -O0 I obtain for example a 300KB binary and
too much stack usage.
In second case I obtain a 200KB binary and a very less stack usage
than -O0 case.

I need only stack usage optimization and NO code optimization (to let
us easly debug the code), which parameters I need to use?

thanks



-- 
Pro pace mundi adversus meganoides tertio Daitarn pugnabo.
Nisi times hanc vim, pugna!

Massimiliano Cialdi
cialdi@xxxxxxxxx
massimiliano.cialdi@xxxxxxxxxxxx

[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