From: slnc <s@slnc.me>
To: David Daney <ddaney@caviumnetworks.com>
Cc: "John (Eljay) Love-Jensen" <eljay@adobe.com>,
"gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: Optimization flags not working (GCC 4.2.4)
Date: Sat, 04 Apr 2009 00:47:00 -0000 [thread overview]
Message-ID: <49D6ADF8.4050607@slnc.me> (raw)
In-Reply-To: <49D6A80D.40409@caviumnetworks.com>
David Daney wrote:
> slnc wrote:
>> Hi John,
>>
>> Thank you but -O0 makes no difference.
>>
>
> That's what he just said. If you use -O0 (the implied default) none of
> the optimizations are done. Use -O1 (or -O2 or -O3) if you want
> optimizations done.
Oh, I misunderstood him, sorry. It also doesn't work if I omit
-O<anything>. So to sum it up, there is no way to compile a program in
gcc enabling only one specific optimization flag. The only option is to
use the "pre-packaged" sets of flags (-O1, -O2 or -O3) right?
I have tried disabling all -O1 flags just to check if I could select
only one by disabling all the others but:
gcc -c -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 main.c
objdump -d dce.o
generates an optimized version. So why are the flags there if they
cannot be selected individually? (I feel like I am missing something
completely obvious..)
Thank you,
--
slnc
next prev parent reply other threads:[~2009-04-04 0:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-03 19:31 slnc
2009-04-03 21:45 ` John (Eljay) Love-Jensen
2009-04-03 23:55 ` slnc
2009-04-04 0:31 ` David Daney
2009-04-04 0:47 ` slnc [this message]
2009-04-04 0:58 ` Robert William Fuller
2009-04-04 1:01 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49D6ADF8.4050607@slnc.me \
--to=s@slnc.me \
--cc=ddaney@caviumnetworks.com \
--cc=eljay@adobe.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).