This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16355] New: Duplicate function epilog
- From: "anton at samba dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2004 05:10:38 -0000
- Subject: [Bug c/16355] New: Duplicate function epilog
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A 3.5 powerpc64 toolchain from cvs (20040703) was used to compile a linux
kernel. I noticed some functions had more than one function epilog. A cut down
testcase is:
int foo(a)
{
if (a)
return 1;
#if 1
bar();
#endif
return 0;
}
When the call to bar() is present we get 2 function epilogs:
.foo:
cmpdi 7,3,0
mflr 0
li 3,1
std 0,16(1)
stdu 1,-112(1)
beq- 7,.L6
addi 1,1,112
ld 0,16(1)
mtlr 0
blr
.L6:
bl .bar
nop
addi 1,1,112
li 3,0
ld 0,16(1)
mtlr 0
blr
We only duplicate 4 instructions here, but on functions which spill a large
number of registers the duplication is worse.
--
Summary: Duplicate function epilog
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anton at samba dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16355