public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
@ 2002-06-14 16:35 rth
0 siblings, 0 replies; 3+ messages in thread
From: rth @ 2002-06-14 16:35 UTC (permalink / raw)
To: fshvaige, gcc-bugs, gcc-prs, nobody
Synopsis: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Fri Jun 14 16:31:12 2002
State-Changed-Why:
x86 silliness fixed for 3.2.
ppc backend doesn't support sibcalls.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7005
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
@ 2002-06-12 6:46 Andrew Pinski
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2002-06-12 6:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR optimization/7005; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: fshvaige@cisco.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
Date: Wed, 12 Jun 2002 09:36:09 -0400 (EDT)
This has been fixed in gcc version 3.2 20020607 (experimental) at least for the i686 version.
I did not check the ppc-eabi version but I do not think that the PowerPC version can be changed because the abi specifies this.
Thanks,
Andrew Pinski
> >Description:
> File test2.c:
>
> int f1 (void);
> int f2 (void) {
> return f1 ();
> }
>
> i686 -Os (best code):
>
> f2:
> jmp f1
>
> i686 -O2/-O3 (Ooops):
>
> f2:
> subl $12, %esp
> addl $12, %esp
> jmp f1
>
> PowerPC -Os/-O2/-O3 (Ooops):
>
> f2:
> stwu 1,-8(1)
> mflr 0
> stw 0,12(1)
> bl f1
> lwz 0,12(1)
> addi 1,1,8
> mtlr 0
> blr
> >How-To-Repeat:
> gcc -S -Os test2.c -Wall -fomit-frame-pointer
> gcc -S -O2 test2.c -Wall -fomit-frame-pointer
> gcc -S -O3 test2.c -Wall -fomit-frame-pointer
> ppc-eabi-gcc -S -Os test2.c -Wall -fomit-frame-pointer
> ppc-eabi-gcc -S -O2 test2.c -Wall -fomit-frame-pointer
> ppc-eabi-gcc -S -O3 test2.c -Wall -fomit-frame-pointer
^ permalink raw reply [flat|nested] 3+ messages in thread
* optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
@ 2002-06-12 6:16 fshvaige
0 siblings, 0 replies; 3+ messages in thread
From: fshvaige @ 2002-06-12 6:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7005
>Category: optimization
>Synopsis: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Wed Jun 12 06:16:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: fshvaige@cisco.com
>Release: 3.1 and 3.1 20020510 (prerelease)
>Organization:
>Environment:
>Description:
File test2.c:
int f1 (void);
int f2 (void) {
return f1 ();
}
i686 -Os (best code):
f2:
jmp f1
i686 -O2/-O3 (Ooops):
f2:
subl $12, %esp
addl $12, %esp
jmp f1
PowerPC -Os/-O2/-O3 (Ooops):
f2:
stwu 1,-8(1)
mflr 0
stw 0,12(1)
bl f1
lwz 0,12(1)
addi 1,1,8
mtlr 0
blr
>How-To-Repeat:
gcc -S -Os test2.c -Wall -fomit-frame-pointer
gcc -S -O2 test2.c -Wall -fomit-frame-pointer
gcc -S -O3 test2.c -Wall -fomit-frame-pointer
ppc-eabi-gcc -S -Os test2.c -Wall -fomit-frame-pointer
ppc-eabi-gcc -S -O2 test2.c -Wall -fomit-frame-pointer
ppc-eabi-gcc -S -O3 test2.c -Wall -fomit-frame-pointer
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-14 23:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 16:35 optimization/7005: Sibling and tail recursive calls optimisation with -fomit-frame-pointer: strange code generated rth
-- strict thread matches above, loose matches on Subject: below --
2002-06-12 6:46 Andrew Pinski
2002-06-12 6:16 fshvaige
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).