public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: John Love-Jensen <eljay@adobe.com>
To: "龙海涛 " <longhaitao@otsc.com.cn>, "MSX to GCC" <gcc-help@gcc.gnu.org>
Subject: Re: a question about code optimization
Date: Sat, 05 Jan 2008 14:25:00 -0000	[thread overview]
Message-ID: <C3A2317F.29C3B%eljay@adobe.com> (raw)
In-Reply-To: <477C37E0.1060006@otsc.com.cn>

Hi,

> So my questions is:
> is gcc *smart* enough that she can determine when to do the optimization?

Yes.

GCC can do the optimization when the optimizer has sufficient information to
be certain that there are no side effects.

GCC can not do the optimization when there is a black-box routine involved.
Although there may be some aspects outside of the black-box routine that may
be optimized.

There is another compiler, LLVM, that does holistic optimizations.  If I
recall correct, there is an effort to add (or perhaps merely to investigate
adding) holistic optimizations into GCC.

--Eljay

  reply	other threads:[~2008-01-03 12:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <C3A0E1D1.29B03%eljay@adobe.com>
2008-01-04 14:38 ` 龙海涛
2008-01-05 14:25   ` John Love-Jensen [this message]
2008-01-09 17:06     ` 龙海涛
2008-01-09 23:03       ` 龙海涛
2008-01-10 19:51       ` John Love-Jensen
2007-12-22  5:41 龙海涛
2007-12-22 10:20 ` Christoph Bartoschek
2007-12-25  3:00   ` 龙海涛

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=C3A2317F.29C3B%eljay@adobe.com \
    --to=eljay@adobe.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=longhaitao@otsc.com.cn \
    /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).