public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/6882: [SPARC] Useless stack adjustment code
Date: Mon, 31 Mar 2003 09:47:00 -0000	[thread overview]
Message-ID: <20030331085601.9390.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/6882; it has been noted by GNATS.

From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: Eric Botcazou <ebotcazou@libertysurf.fr>
Cc: Hans-Peter Nilsson <hp@bitrange.com>, <dann@godzilla.ics.uci.edu>,
   <gcc-bugs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org>
Subject: Re: target/6882: [SPARC] Useless stack adjustment code
Date: 31 Mar 2003 10:50:21 +0200

 Eric Botcazou <ebotcazou@libertysurf.fr> writes:
 
 > > No, it seems a valid optimization request to not emit the
 > > stack-adjustment code.  Could you find a *specific* reason for
 > > the stack-adjustment code?  (Please state that in the PR.)
 > 
 > No, I don't see a "specific" reason. But:
 > - functions from the same translation unit that call it (and that appear 
 > after it in normal mode, but the restriction is lifted with 
 > -funit-at-a-time) don't actually emit the call,
 > - would the benefit be worth it in real life, given that the costly operation 
 > is to call the function itself (for nothing)? I think the real optimization 
 > is not to emit the call at all.
 
 Don't know about SPARC, but on Alpha, this also occurs with non-nop
 functions:
 
 struct s2 { unsigned long a, b; };
 unsigned long f8(struct s2 x) {  return x.a + x.b; }
 0000000000000000 <f8>:
    0:   00 04 11 42     addq    a0,a1,v0
    4:   f0 ff de 23     lda     sp,-16(sp)
    8:   10 00 de 23     lda     sp,16(sp)
    c:   01 80 fa 6b     ret
 
 While the optimization certainly isn't that important, it also seems
 to be not too difficult, and the code size saving is also nice.
 
 -- 
 	Falk


             reply	other threads:[~2003-03-31  8:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-31  9:47 Falk Hueffner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-31 14:36 Eric Botcazou
2003-03-31 12:46 Hans-Peter Nilsson
2003-03-31  8:56 Eric Botcazou
2003-03-31  5:06 hp
2003-03-31  4:18 Hans-Peter Nilsson
2003-03-29  9:51 ebotcazou

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=20030331085601.9390.qmail@sources.redhat.com \
    --to=falk.hueffner@student.uni-tuebingen.de \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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).