Re: -O1 single optimization parameter

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

 



massimiliano cialdi wrote:
> On Thu, Oct 9, 2008 at 10:57 AM, Andrew Haley <aph@xxxxxxxxxx> wrote:
>>> I need only stack usage optimization and NO code optimization (to let
>>> us easly debug the code), which parameters I need to use?
>> It's not possible.
> I try to relax my constraint.
> I need to reduce stack usage and keep the project debuggable (maybe
> with some code optimization)
> which set of parameters do I need to use.

> Last, only for curiosity, how can I reproduce exacly the behaviour of -O0?

By using -O0.

> as I said in previous mail I tried 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
> -fno-caller-saves
> 
> and I obtain a binary quite much optimized than which one optained
> only with -O0.

As I'd expect: optimization is enabled.

> So which parameter are missing from that list?

You seem to think it is possible to do that.  I don't know why you
think such a thing.  I don't think it is possible.

You seem to believe that there is some magic set of command line options
that will duplicate the various -O flags.  There isn't.

There are lots of places in the compiler with things like

if (optimize > 0)
{
  ... do some optimization ...
}

Andrew.



[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