This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/11180] [avr-gcc] Optimization decrease performance of struct assignment.
- From: "rask at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2007 17:30:44 -0000
- Subject: [Bug target/11180] [avr-gcc] Optimization decrease performance of struct assignment.
- References: <bug-11180-6291@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from rask at gcc dot gnu dot org 2007-09-16 17:30 -------
Created an attachment (id=14213)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14213&action=view)
quick and dirty patch to reduce code size
Here's a patch which doesn't mess up the stack pointer update in the epilogue.
The code size output is broken on mainline, so here's what I use:
$ gcc/xgcc -Bgcc/ -W -Wall ~/pr11180.c -S -dp -o /dev/stdout -O2 | awk
'match($0, /\[length = ([[:digit:]]+)\]/, field) { sum += field[1]; } END {
print sum; }'
27
Compare that to unpatched mainline:
$ gcc/xgcc -Bgcc/ -W -Wall ~/pr11180.c -S -dp -o /dev/stdout -O2 | awk
'match($0, /\[length = ([[:digit:]]+)\]/, field) { sum += field[1]; } END {
print sum; }'
36
--
rask at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #14211|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11180