public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/41175] -Os generates significantly larger code
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
@ 2009-08-26 14:18 ` galak at kernel dot crashing dot org
2009-08-26 14:18 ` galak at kernel dot crashing dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: galak at kernel dot crashing dot org @ 2009-08-26 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from galak at kernel dot crashing dot org 2009-08-26 14:18 -------
Created an attachment (id=18428)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18428&action=view)
size of all object files using gcc 4.3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/41175] New: -Os generates significantly larger code
@ 2009-08-26 14:18 galak at kernel dot crashing dot org
2009-08-26 14:18 ` [Bug c/41175] " galak at kernel dot crashing dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: galak at kernel dot crashing dot org @ 2009-08-26 14:18 UTC (permalink / raw)
To: gcc-bugs
Using -Os with gcc4.4 vs gcc4.3 we see a ~15% increase in code size. This is
due to the fact that load/store multiple instructions are not being used for
function prologue/epilogues. The other option would be to use out of line
save/restore calls in the prologue/epilogues (which are also not being used).
We are no longer able to build the u-boot open source loader because the code
size increase expands beyond the allowable size (to meet flash constraints).
--
Summary: -Os generates significantly larger code
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: galak at kernel dot crashing dot org
GCC build triplet: ppc64-redhat-linux
GCC host triplet: ppc64-redhat-linux
GCC target triplet: ppc64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/41175] -Os generates significantly larger code
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
2009-08-26 14:18 ` [Bug c/41175] " galak at kernel dot crashing dot org
@ 2009-08-26 14:18 ` galak at kernel dot crashing dot org
2009-08-26 14:20 ` galak at kernel dot crashing dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: galak at kernel dot crashing dot org @ 2009-08-26 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from galak at kernel dot crashing dot org 2009-08-26 14:18 -------
Created an attachment (id=18429)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18429&action=view)
size of all object files using gcc 4.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/41175] -Os generates significantly larger code
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
2009-08-26 14:18 ` [Bug c/41175] " galak at kernel dot crashing dot org
2009-08-26 14:18 ` galak at kernel dot crashing dot org
@ 2009-08-26 14:20 ` galak at kernel dot crashing dot org
2009-09-10 23:11 ` [Bug target/41175] " jakub at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: galak at kernel dot crashing dot org @ 2009-08-26 14:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from galak at kernel dot crashing dot org 2009-08-26 14:20 -------
I've attached comparisions of building the same u-boot source tree with gcc-4.3
from Fedora 10 on a PPC 64 host:
[galak@blarg u-boot-85xx]$ gcc -v
Using built-in specs.
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--enable-secureplt --with-long-double-128 --build=ppc64-redhat-linux
--target=ppc64-redhat-linux --with-cpu=default32
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
vs gcc 4.4 on a FC11 PPC64 host:
[root@ducky u-boot]# gcc -v
Using built-in specs.
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --enable-secureplt --with-long-double-128
--build=ppc64-redhat-linux --target=ppc64-redhat-linux --with-cpu=default32
Thread model: posix
gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/41175] -Os generates significantly larger code
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
` (2 preceding siblings ...)
2009-08-26 14:20 ` galak at kernel dot crashing dot org
@ 2009-09-10 23:11 ` jakub at gcc dot gnu dot org
2009-09-15 20:12 ` jakub at gcc dot gnu dot org
2009-10-05 22:23 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-09-10 23:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-09-10 23:11 -------
Created an attachment (id=18564)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18564&action=view)
gcc45-pr41175.patch
Incremental fix on top of Nathan's patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/41175] -Os generates significantly larger code
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
` (3 preceding siblings ...)
2009-09-10 23:11 ` [Bug target/41175] " jakub at gcc dot gnu dot org
@ 2009-09-15 20:12 ` jakub at gcc dot gnu dot org
2009-10-05 22:23 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-09-15 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2009-09-15 20:12 -------
Subject: Bug 41175
Author: jakub
Date: Tue Sep 15 20:12:18 2009
New Revision: 151729
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151729
Log:
PR target/41175
PR target/40677
* config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
problem.
(SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
(rs6000_savres_strategy): Always save FP registers inline if the
target doesn't support hardware double-precision. Set the above
bits in return value when needed.
(rs6000_savres_routine_sym): Fix computation for cache selector.
Mark the generated symbol as a function. Rename exitp argument to
lr. Move code for determining the name of the symbol...
(rs6000_savres_routine_name): ...here. New function. Add cases for
getting the names right on AIX and 64-bit Linux.
(savres_routine_name): New variable.
(rs6000_make_savres_rtx): Rename exitp argument to lr. Don't assert
lr isn't set when savep. Use r12 resp. r1 instead of r11 depending
on what the target routine uses as a base register. If savep && lr
describe saving of r0 into memory slot.
(rs6000_emit_prologue): Correct use of call_used_regs. Fix out of
line calls for AIX ABI.
(rs6000_output_function_prologue): Use rs6000_savres_routine_name to
determine FP save/restore functions.
(rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
frame_reg_rtx != sp_reg_rtx. Use gen_add3_insn instead of
gen_addsi3.
(rs6000_emit_epilogue): Adjust computation of restore_lr.
Duplicate restoration of LR and execute the appropriate one
depending on whether GPRs are being restored inline. Set r11 from
offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
r11, adjust sp_offset. Use gen_add3_insn instead of gen_addsi3.
Fix out of line calls for AIX ABI.
* config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
New insn.
* config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
register 11.
(*restore_gpregs_spe): Likewise.
(*return_and_restore_gpregs_spe): Likewise.
* config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
Define to empty string unconditionally.
* config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
Define to empty string unconditionally.
(GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
!TARGET_64BIT.
* gcc.target/powerpc/pr41175.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/powerpc/pr41175.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/linux64.h
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/rs6000.md
trunk/gcc/config/rs6000/spe.md
trunk/gcc/config/rs6000/sysv4.h
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/41175] -Os generates significantly larger code
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
` (4 preceding siblings ...)
2009-09-15 20:12 ` jakub at gcc dot gnu dot org
@ 2009-10-05 22:23 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-05 22:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2009-10-05 22:22 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41175
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-05 22:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26 14:18 [Bug c/41175] New: -Os generates significantly larger code galak at kernel dot crashing dot org
2009-08-26 14:18 ` [Bug c/41175] " galak at kernel dot crashing dot org
2009-08-26 14:18 ` galak at kernel dot crashing dot org
2009-08-26 14:20 ` galak at kernel dot crashing dot org
2009-09-10 23:11 ` [Bug target/41175] " jakub at gcc dot gnu dot org
2009-09-15 20:12 ` jakub at gcc dot gnu dot org
2009-10-05 22:23 ` pinskia at gcc dot gnu dot org
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).