public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-31  5:06 hp
  0 siblings, 0 replies; 7+ messages in thread
From: hp @ 2003-03-31  5:06 UTC (permalink / raw)
  To: dann, gcc-bugs, gcc-prs, nobody

Synopsis: [SPARC] Useless stack adjustment code

State-Changed-From-To: closed->open
State-Changed-By: hp
State-Changed-When: Mon Mar 31 04:18:16 2003
State-Changed-Why:
    Seems a valid request.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6882


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-31 14:36 Eric Botcazou
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Botcazou @ 2003-03-31 14:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Eric Botcazou <ebotcazou@libertysurf.fr>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: 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: Mon, 31 Mar 2003 16:07:38 +0200

 > Now you're arguing about the *value of the optimization*.
 > I was arguing about *closing the PR for the wrong reason*.
 
 Well, you only asked me to give a specific reason for the adjustment code.
 I agreed that there appears to be no compelling reason for it. But the 
 problem is that the code is emitted anyway. So IMHO the right question is 
 rather: are there strong enough reasons for removing it? Therefore I gave my 
 opinion on this latter question.
 
 > Having said that, let's continue to the *new* discussion.  You
 > can't optimize out the call from other translation units.  Not
 > being a SPARC maintainer I won't try to judge on the benefit,
 > but it looks simple enough and seems worthwhile.  C++ tends to
 > generate a lot of small trivial functions.
 
 Maybe. My impression is that, if the optimization was that simple and that 
 worthwhile, it would already have been implemented. But I'm not a SPARC 
 maintainer either, so...
 
 -- 
 Eric Botcazou


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-31 12:46 Hans-Peter Nilsson
  0 siblings, 0 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2003-03-31 12:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Hans-Peter Nilsson <hp@bitrange.com>
To: Eric Botcazou <ebotcazou@libertysurf.fr>
Cc: 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: Mon, 31 Mar 2003 07:44:27 -0500 (EST)

 On Mon, 31 Mar 2003, Eric Botcazou wrote:
 
 > > 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.
 
 Now you're arguing about the *value of the optimization*.
 I was arguing about *closing the PR for the wrong reason*.
 It seemed to indicate a misunderstanding about GCC rather than a
 special need on the SPARC.  For example, the CRIS and MMIX
 targets don't emit that kind of redundant stack frame.
 
 Having said that, let's continue to the *new* discussion.  You
 can't optimize out the call from other translation units.  Not
 being a SPARC maintainer I won't try to judge on the benefit,
 but it looks simple enough and seems worthwhile.  C++ tends to
 generate a lot of small trivial functions.
 
 brgds, H-P
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-31  9:47 Falk Hueffner
  0 siblings, 0 replies; 7+ messages in thread
From: Falk Hueffner @ 2003-03-31  9:47 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-31  8:56 Eric Botcazou
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Botcazou @ 2003-03-31  8:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Eric Botcazou <ebotcazou@libertysurf.fr>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: <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: Mon, 31 Mar 2003 09:37:25 +0200

 > 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.
 
 -- 
 Eric Botcazou


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-31  4:18 Hans-Peter Nilsson
  0 siblings, 0 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2003-03-31  4:18 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Hans-Peter Nilsson <hp@bitrange.com>
To: ebotcazou@gcc.gnu.org,  <dann@godzilla.ics.uci.edu>, 
     <gcc-bugs@gcc.gnu.org>,  <gcc-prs@gcc.gnu.org>,  <nobody@gcc.gnu.org>, 
     <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: target/6882: [SPARC] Useless stack adjustment code
Date: Sun, 30 Mar 2003 23:15:52 -0500 (EST)

 On 29 Mar 2003 ebotcazou@gcc.gnu.org wrote:
 > State-Changed-Why:
 >     The prologue is always emitted if assembly code is emitted for the function.
 
 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.)
 I'll re-open this PR.
 
 brgds, H-P
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: target/6882: [SPARC] Useless stack adjustment code
@ 2003-03-29  9:51 ebotcazou
  0 siblings, 0 replies; 7+ messages in thread
From: ebotcazou @ 2003-03-29  9:51 UTC (permalink / raw)
  To: dann, gcc-bugs, gcc-prs, nobody

Synopsis: [SPARC] Useless stack adjustment code

State-Changed-From-To: open->closed
State-Changed-By: ebotcazou
State-Changed-When: Sat Mar 29 09:34:42 2003
State-Changed-Why:
    The prologue is always emitted if assembly code is emitted for the function.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6882


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-03-31 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-31  5:06 target/6882: [SPARC] Useless stack adjustment code hp
  -- 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  9:47 Falk Hueffner
2003-03-31  8:56 Eric Botcazou
2003-03-31  4:18 Hans-Peter Nilsson
2003-03-29  9:51 ebotcazou

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).