public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/41095]  New: 4x bigger object when compiled with -O3 option
@ 2009-08-17 19:52 ami_stuff at o2 dot pl
  2009-08-17 20:00 ` [Bug c/41095] " ami_stuff at o2 dot pl
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-08-17 19:52 UTC (permalink / raw)
  To: gcc-bugs

Hi,

When I compile "libavcodec/dsputil.c" file from FFmpeg package with these
options (-O2 -fipa-cp-clone -finline-functions -fgcse-after-reload
-ftree-vectorize -fpredictive-commoning -funswitch-loops):

OPTFLAGS= -mnobitfield -m68060 -std=c99  -Wdeclaration-after-statement
-Wdisabled-optimization -fno-math-errno -D_ISOC99_SOURCE
-D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-common
-fomit-frame-pointer -Wall -Wno-switch -Wpointer-arith -Wredundant-decls
-Wcast-qual -Wwrite-strings -Wundef -O2 -fipa-cp-clone -finline-functions
-fgcse-after-reload -ftree-vectorize -fpredictive-commoning -funswitch-loops

I get "dsputil.o" with size of 306kb.

When I compile "dsputil.c" with -O3 option:

OPTFLAGS= -mnobitfield -m68060 -std=c99  -Wdeclaration-after-statement
-Wdisabled-optimization -fno-math-errno -D_ISOC99_SOURCE
-D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-common
-fomit-frame-pointer -Wall -Wno-switch -Wpointer-arith -Wredundant-decls
-Wcast-qual -Wwrite-strings -Wundef -O3

I get "dsputil.o" with size of 1,18mb.


-- 
           Summary: 4x bigger object when compiled with -O3 option
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ami_stuff at o2 dot pl
  GCC host triplet: i686-cygwin
GCC target triplet: m68k-amigaos


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug c/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
@ 2009-08-17 20:00 ` ami_stuff at o2 dot pl
  2009-08-17 20:03 ` ami_stuff at o2 dot pl
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-08-17 20:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ami_stuff at o2 dot pl  2009-08-17 20:00 -------
Created an attachment (id=18386)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18386&action=view)
preprocessed file -O2  -f...

-O2 -fipa-cp-clone -finline-functions -fgcse-after-reload -ftree-vectorize
-fpredictive-commoning -funswitch-loops


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug c/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
  2009-08-17 20:00 ` [Bug c/41095] " ami_stuff at o2 dot pl
@ 2009-08-17 20:03 ` ami_stuff at o2 dot pl
  2009-08-17 20:04 ` ami_stuff at o2 dot pl
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-08-17 20:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ami_stuff at o2 dot pl  2009-08-17 20:02 -------
Created an attachment (id=18387)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18387&action=view)
asm output -O2 -f...

-O2 -fipa-cp-clone -finline-functions -fgcse-after-reload -ftree-vectorize
-fpredictive-commoning -funswitch-loops


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug c/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
  2009-08-17 20:00 ` [Bug c/41095] " ami_stuff at o2 dot pl
  2009-08-17 20:03 ` ami_stuff at o2 dot pl
@ 2009-08-17 20:04 ` ami_stuff at o2 dot pl
  2009-08-17 20:06 ` ami_stuff at o2 dot pl
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-08-17 20:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ami_stuff at o2 dot pl  2009-08-17 20:04 -------
Created an attachment (id=18388)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18388&action=view)
preprocessed file -O3

-O3


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug c/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (2 preceding siblings ...)
  2009-08-17 20:04 ` ami_stuff at o2 dot pl
@ 2009-08-17 20:06 ` ami_stuff at o2 dot pl
  2009-08-26 20:26 ` ami_stuff at o2 dot pl
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-08-17 20:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ami_stuff at o2 dot pl  2009-08-17 20:05 -------
Created an attachment (id=18389)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18389&action=view)
asm output -O3

-O3


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug c/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (3 preceding siblings ...)
  2009-08-17 20:06 ` ami_stuff at o2 dot pl
@ 2009-08-26 20:26 ` ami_stuff at o2 dot pl
  2009-08-26 20:54 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-08-26 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ami_stuff at o2 dot pl  2009-08-26 20:25 -------
-m68060 -O3 ...:

GCC 4.1.2 - 385KB
GCC 4.2.5 - 386KB
GCC 4.3.2 - 777KB
GCC 4.4.1 - 1,18MB


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug c/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (4 preceding siblings ...)
  2009-08-26 20:26 ` ami_stuff at o2 dot pl
@ 2009-08-26 20:54 ` rguenth at gcc dot gnu dot org
  2009-09-02 15:43 ` [Bug target/41095] " ami_stuff at o2 dot pl
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-26 20:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-08-26 20:54 -------
Likely the same issue as PR40992.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |40992


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug target/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (5 preceding siblings ...)
  2009-08-26 20:54 ` rguenth at gcc dot gnu dot org
@ 2009-09-02 15:43 ` ami_stuff at o2 dot pl
  2009-10-05 17:48 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2009-09-02 15:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ami_stuff at o2 dot pl  2009-09-02 15:42 -------
GCC 4.5.0 (20090827): 888KB


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug target/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (6 preceding siblings ...)
  2009-09-02 15:43 ` [Bug target/41095] " ami_stuff at o2 dot pl
@ 2009-10-05 17:48 ` pinskia at gcc dot gnu dot org
  2010-01-02 15:02 ` ami_stuff at o2 dot pl
  2010-01-23  3:26 ` ami_stuff at o2 dot pl
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-05 17:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2009-10-05 17:48 -------
Doubt it is the same as 40992 as this does not use inline-asm that much.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|40992                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug target/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (7 preceding siblings ...)
  2009-10-05 17:48 ` pinskia at gcc dot gnu dot org
@ 2010-01-02 15:02 ` ami_stuff at o2 dot pl
  2010-01-23  3:26 ` ami_stuff at o2 dot pl
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2010-01-02 15:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ami_stuff at o2 dot pl  2010-01-02 15:02 -------
GCC 4.5.0 (20091224): 840KB

When I use "-O3 -fno-inline-functions -fno-unswitch-loops
-fno-predictive-commoning -fno-gcse-after-reload -fno-tree-vectorize", size
increases to 944KB.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

* [Bug target/41095] 4x bigger object when compiled with -O3 option
  2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
                   ` (8 preceding siblings ...)
  2010-01-02 15:02 ` ami_stuff at o2 dot pl
@ 2010-01-23  3:26 ` ami_stuff at o2 dot pl
  9 siblings, 0 replies; 11+ messages in thread
From: ami_stuff at o2 dot pl @ 2010-01-23  3:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ami_stuff at o2 dot pl  2010-01-23 03:26 -------
Looks like -mnobitfield option increases object's size more than 100%. I don't
know if so big file size increase is correct. Another problem can be noticed
with GCC 4.4.2 which generated 45% bigger object than the rest of the 4.x
compilers, so maybe some internal settings should be tweaked for this branch.

GCC 3.4.0

-m68060 -O3: 185KB

-m68060 -O3 -mnobitfield: 265KB


GCC 4.1.2:


-m68060 -O3: 386KB

-m68060 -O3 -mnobitfield: 783KB


GCC 4.2.5:


-m68060 -O3: 387KB

-m68060 -O3 -mnobitfield: 792KB


GCC 4.3.2

-m68060 -O3: 378KB

-m68060 -O3 -mnobitfield: 781KB


GCC 4.4.2:

-m68060 -O3: 554KB

-m68060 -O3 -mnobitfield: 1,18MB


GCC 4.5.0

-m68060 -O3: 383KB

-m68060 -O3 -mnobitfield: 840KB


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41095


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

end of thread, other threads:[~2010-01-23  3:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-17 19:52 [Bug c/41095] New: 4x bigger object when compiled with -O3 option ami_stuff at o2 dot pl
2009-08-17 20:00 ` [Bug c/41095] " ami_stuff at o2 dot pl
2009-08-17 20:03 ` ami_stuff at o2 dot pl
2009-08-17 20:04 ` ami_stuff at o2 dot pl
2009-08-17 20:06 ` ami_stuff at o2 dot pl
2009-08-26 20:26 ` ami_stuff at o2 dot pl
2009-08-26 20:54 ` rguenth at gcc dot gnu dot org
2009-09-02 15:43 ` [Bug target/41095] " ami_stuff at o2 dot pl
2009-10-05 17:48 ` pinskia at gcc dot gnu dot org
2010-01-02 15:02 ` ami_stuff at o2 dot pl
2010-01-23  3:26 ` ami_stuff at o2 dot pl

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