public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Winalski, Paul" <paul.winalski@intel.com>
To: "'gcc@gcc.gnu.org'" <gcc@gcc.gnu.org>
Subject: RE: gcc and the IA64 ABI
Date: Fri, 23 May 2003 18:41:00 -0000	[thread overview]
Message-ID: <A5974D8E5F98D511BB910002A50A6647065013B9@hdsmsx103.hd.intel.com> (raw)

We are experimenting with taking advantage of non-default symbol
visibility (i.e., restricting symbol preemption) to enable more
aggressive optimizations, including dispensing with the caller
save/restore of gp on external calls made via undefined external
symbols with restricted (protected, hidden, or internal) visibility.
As permitted by the ELF Spec, we are interpreting a declaration such
as:

    void foo() __attribute__((visibility("protected")));

where foo is external to the current compilation unit, as an assertion
by the programmer that foo(), although external, will be linked into
the same component as the current compilation unit, and therefore
will share the same gp value, and therefore calls to foo() can dispense
with saving/restoring gp around the call.

The part of the IA64 ABI under discussion restricts tail calls to undefined
external symbols to those cases where the compiler knows that the
target of the tail call will be in the same component (and hence share
the same gp value) as the routine making the tail call.  Essentially
the same conditions as we are using for the optimization dispensing
with the save/restore of gp around a call.

Our study of the situation so far indicates that tail call opportunities
on Itanium are quite limited.  Use of the alloc instruction in the caller
precludes tail calls, for example.  But eliminating caller gp save/restore
seems to be promising.  Early testing seems to indicate significant
improvement on some important programs; we're still in the process of
collecting performance data.  If you have evidence that tail call
optimization is a significant performance win on Itanium, we'd love
to hear about it before we go charging down the wrong path.

Regards,

-Paul Winalski, Intel Corporation

             reply	other threads:[~2003-05-23 18:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 18:41 Winalski, Paul [this message]
     [not found] <A5974D8E5F98D511BB910002A50A6647065013B8@hdsmsx103.hd.intel.com>
2003-05-23 19:09 ` Richard Henderson
2003-05-23 20:38 Steve Ellcey
2003-05-28 15:12 Winalski, Paul

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=A5974D8E5F98D511BB910002A50A6647065013B9@hdsmsx103.hd.intel.com \
    --to=paul.winalski@intel.com \
    --cc=gcc@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).