public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/26658]  New: perfomance regression between gcc 3.4.5 and 4.*
@ 2006-03-12 20:11 nbkolchin at gmail dot com
  2006-03-12 20:12 ` [Bug regression/26658] " nbkolchin at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: nbkolchin at gmail dot com @ 2006-03-12 20:11 UTC (permalink / raw)
  To: gcc-bugs

During "bashmark" memory benchmark perfomance analyze, I found ~100x perfomance
regression between gcc 3.4.5 and gcc 4.X.

Compiler options: -march=athlon-xp -O3

test_cmd execution time:
- GCC 3.4.5: 0.43user 0.00system 0:00.44elapsed
- GCC 4.0.2: 34.83user 0.68system 0:36.09elapsed
- GCC 4.1.0: 33.86user 0.58system 0:34.96elapsed

Lurking inside assembler generation showed that GCC4 don't inline memcpy and
memset calls. (I can attach assembler code on request)

So, it looks like GCC4 inliner is broken at some point.

--------- GCC 3.4.5 output------------------------------------------
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/specs
Configured with: /mnt/oktet/tmp/portage/gcc-3.4.5-r1/work/gcc-3.4.5/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.5
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)
 /usr/libexec/gcc/i686-pc-linux-gnu/3.4.5/cc1plus -E -quiet -v -D_GNU_SOURCE
test_cmd.cpp -march=athlon-xp -O3 -o test_cmd.ii
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/libffi
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3/i686-pc-linux-gnu
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3/backward
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i686-pc-linux-gnu/3.4.5/cc1plus -fpreprocessed test_cmd.ii
-quiet -dumpbase test_cmd.cpp -march=athlon-xp -auxbase test_cmd -O3 -version
-o test_cmd.s
GNU C++ version 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)
(i686-pc-linux-gnu)
        compiled by GNU C version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0,
pie-8.7.9).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129319
---------------------------------------------------

-----------GCC 4.0.2 output -----------------------
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /mnt/oktet/tmp/portage/gcc-4.0.2-r3/work/gcc-4.0.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.0.2
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.0.2/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-nls --with-system-zlib --disable-checking --disable-werror
--disable-libunwind-exceptions --disable-multilib --disable-libmudflap
--disable-libssp --disable-libgcj --enable-languages=c,c++ --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8)
 /usr/libexec/gcc/i686-pc-linux-gnu/4.0.2/cc1plus -E -quiet -v -D_GNU_SOURCE
test_cmd.cpp -march=athlon-xp -O3 -fpch-preprocess -o test_cmd.ii
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/libffi
 /usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/g++-v4
 /usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/g++-v4/i686-pc-linux-gnu
 /usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include/g++-v4/backward
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.0.2/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i686-pc-linux-gnu/4.0.2/cc1plus -fpreprocessed test_cmd.ii
-quiet -dumpbase test_cmd.cpp -march=athlon-xp -auxbase test_cmd -O3 -version
-o test_cmd.s
GNU C++ version 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8) (i686-pc-linux-gnu)
        compiled by GNU C version 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129319
---------------------------------------------------

----------GCC 4.1.0 output-------------------------
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /mnt/oktet/tmp/portage/gcc-4.1.0-r2/work/gcc-4.1.0/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.0
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libmudflap --disable-libssp --enable-java-awt=gtk
--enable-languages=c,c++,java,objc,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.0 (Gentoo 4.1.0-r2, pie-8.7.8)
 /usr/libexec/gcc/i686-pc-linux-gnu/4.1.0/cc1plus -E -quiet -v -D_GNU_SOURCE
test_cmd.cpp -march=athlon-xp -O3 -fpch-preprocess -o test_cmd.ii
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/libffi
 /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4
 /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4/i686-pc-linux-gnu
 /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include/g++-v4/backward
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i686-pc-linux-gnu/4.1.0/cc1plus -fpreprocessed test_cmd.ii
-quiet -dumpbase test_cmd.cpp -march=athlon-xp -auxbase test_cmd -O3 -version
-o test_cmd.s
GNU C++ version 4.1.0 (Gentoo 4.1.0-r2, pie-8.7.8) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.0 (Gentoo 4.1.0-r2, pie-8.7.8).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129319
Compiler executable checksum: d3096f5bd00a04a18edac8d63d29a37f
---------------------------------------------------


-- 
           Summary: perfomance regression between gcc 3.4.5 and 4.*
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nbkolchin at gmail dot com


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


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

* [Bug regression/26658] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
@ 2006-03-12 20:12 ` nbkolchin at gmail dot com
  2006-03-12 20:13 ` nbkolchin at gmail dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: nbkolchin at gmail dot com @ 2006-03-12 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from nbkolchin at gmail dot com  2006-03-12 20:12 -------
Created an attachment (id=11027)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11027&action=view)
test_cmd.cpp

testcase.


-- 


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


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

* [Bug regression/26658] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
  2006-03-12 20:12 ` [Bug regression/26658] " nbkolchin at gmail dot com
@ 2006-03-12 20:13 ` nbkolchin at gmail dot com
  2006-03-12 20:14 ` nbkolchin at gmail dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: nbkolchin at gmail dot com @ 2006-03-12 20:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from nbkolchin at gmail dot com  2006-03-12 20:13 -------
Created an attachment (id=11028)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11028&action=view)
test_cmd-3.4.5.ii

-save-temps output from gcc 3.4.5


-- 


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


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

* [Bug regression/26658] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
  2006-03-12 20:12 ` [Bug regression/26658] " nbkolchin at gmail dot com
  2006-03-12 20:13 ` nbkolchin at gmail dot com
@ 2006-03-12 20:14 ` nbkolchin at gmail dot com
  2006-03-12 21:07 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: nbkolchin at gmail dot com @ 2006-03-12 20:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from nbkolchin at gmail dot com  2006-03-12 20:14 -------
Created an attachment (id=11029)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11029&action=view)
test_cmd-4.1.0.ii

-save-temps output from gcc 4.1.0 and gcc 4.0.2 (they are different only in
version numbers)


-- 


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


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

* [Bug regression/26658] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (2 preceding siblings ...)
  2006-03-12 20:14 ` nbkolchin at gmail dot com
@ 2006-03-12 21:07 ` rguenth at gcc dot gnu dot org
  2006-03-12 21:12 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-12 21:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2006-03-12 21:07 -------
apart from visibility stuff, both preprocessed sources are equal and do not
contain inline memcpy/memset from glibc.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


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


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

* [Bug regression/26658] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (3 preceding siblings ...)
  2006-03-12 21:07 ` rguenth at gcc dot gnu dot org
@ 2006-03-12 21:12 ` rguenth at gcc dot gnu dot org
  2006-06-04 19:52 ` [Bug regression/26658] [4.0/4.1/4.2 Regression] " jsm28 at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-12 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2006-03-12 21:12 -------
Confirmed.  3.4.5 requires -march=athlon-xp to inline.


-- 


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


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

* [Bug regression/26658] [4.0/4.1/4.2 Regression] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (4 preceding siblings ...)
  2006-03-12 21:12 ` rguenth at gcc dot gnu dot org
@ 2006-06-04 19:52 ` jsm28 at gcc dot gnu dot org
  2006-06-04 19:56 ` [Bug target/26658] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-06-04 19:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|perfomance regression       |[4.0/4.1/4.2 Regression]
                   |between gcc 3.4.5 and 4.*   |perfomance regression
                   |                            |between gcc 3.4.5 and 4.*
   Target Milestone|---                         |4.1.2


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


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

* [Bug target/26658] [4.0/4.1/4.2 Regression] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (5 preceding siblings ...)
  2006-06-04 19:52 ` [Bug regression/26658] [4.0/4.1/4.2 Regression] " jsm28 at gcc dot gnu dot org
@ 2006-06-04 19:56 ` pinskia at gcc dot gnu dot org
  2006-07-05 17:52 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-04 19:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-06-04 19:54 -------
  for(uint32_t i = 0; i < Loops; i+=1)
  {
#define T memcpy(mb1, mb2, Block_Size); memset(mb2, i, Block_Size);
    T T T T T
    T T T T T
#undef T
  }

That should just reduce to
memcpy(mb1, mb2, Block_Size); memset(mb2, i, Block_Size);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|regression                  |target
 GCC target triplet|                            |i686-pc-linux-gnu


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


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

* [Bug target/26658] [4.0/4.1/4.2 Regression] perfomance regression between gcc 3.4.5 and 4.*
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (6 preceding siblings ...)
  2006-06-04 19:56 ` [Bug target/26658] " pinskia at gcc dot gnu dot org
@ 2006-07-05 17:52 ` mmitchel at gcc dot gnu dot org
  2006-08-27 21:59 ` [Bug target/26658] [4.0/4.1/4.2 Regression] memcpy/memset are not inlining with -march=athlon-xp and size of 128 pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-05 17:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug target/26658] [4.0/4.1/4.2 Regression] memcpy/memset are not inlining with -march=athlon-xp  and size of 128
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (7 preceding siblings ...)
  2006-07-05 17:52 ` mmitchel at gcc dot gnu dot org
@ 2006-08-27 21:59 ` pinskia at gcc dot gnu dot org
  2007-02-14  9:10 ` [Bug target/26658] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-27 21:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-08-27 21:59 -------
I bet this comes down to MOVE_RATIO changing.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 Regression]    |[4.0/4.1/4.2 Regression]
                   |perfomance regression       |memcpy/memset are not
                   |between gcc 3.4.5 and 4.*   |inlining with -march=athlon-
                   |                            |xp  and size of 128


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


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

* [Bug target/26658] [4.0/4.1/4.2/4.3 Regression] memcpy/memset are not inlining with -march=athlon-xp  and size of 128
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (8 preceding siblings ...)
  2006-08-27 21:59 ` [Bug target/26658] [4.0/4.1/4.2 Regression] memcpy/memset are not inlining with -march=athlon-xp and size of 128 pinskia at gcc dot gnu dot org
@ 2007-02-14  9:10 ` mmitchel at gcc dot gnu dot org
  2007-11-07  9:15 ` jakub at gcc dot gnu dot org
  2008-01-13 15:42 ` [Bug target/26658] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug target/26658] [4.0/4.1/4.2/4.3 Regression] memcpy/memset are not inlining with -march=athlon-xp  and size of 128
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (9 preceding siblings ...)
  2007-02-14  9:10 ` [Bug target/26658] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
@ 2007-11-07  9:15 ` jakub at gcc dot gnu dot org
  2008-01-13 15:42 ` [Bug target/26658] [4.1/4.2/4.3 " rguenth at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-07  9:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2007-11-07 09:15 -------
I'd stress that this is extremely worthless "benchmark", because it makes no
attempt to ensure the calls are really done and not optimized away, which
happens
in the 3.4.x -march=athlon-xp case.  At expand time GCC decides which of the
forms of
memcpy/memset are fastest and 4.x believes for -mathlon-xp it is rep; stosl
resp. rep; movsl, while 3.4.x believed it is 32 individual stores resp. 32
reads + 32 stores, another alternative is calling an optimized memcpy library
routine.
Try changing the definition of T to
#define T memcpy(mb1, mb2, Block_Size); memset(mb2, i, Block_Size); asm
volatile ("" : : "r" (mb1), "r" (mb2) : "memory");
which makes sure the memcpy/memsets can't be optimized away and you'll see very
different results.

The thing is just that we are able to DSE just the memcpy/memset expanded to
individual instructions.  What we perhaps should have a tree pass which
analyzes all the usual string operations, knows exactly what they are doing and
will track what they do with memory (track e.g. how long a zero terminated
string
in some buffer is, what values it contains - these len1 bytes are copied from
bufx, these len2 bytes are 0 and change say calls like strcat where we know
where the destination string ends into strcpy (or memcpy if we even known the
length etc.)).

Plus perhaps teach tree DSE about memcpy/memset.


-- 


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


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

* [Bug target/26658] [4.1/4.2/4.3 Regression] memcpy/memset are not inlining with -march=athlon-xp  and size of 128
  2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
                   ` (10 preceding siblings ...)
  2007-11-07  9:15 ` jakub at gcc dot gnu dot org
@ 2008-01-13 15:42 ` rguenth at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-13 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2008-01-13 15:30 -------
I am closing this bug as INVALID based on the doubious testcase.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|[4.0/4.1/4.2/4.3 Regression]|[4.1/4.2/4.3 Regression]
                   |memcpy/memset are not       |memcpy/memset are not
                   |inlining with -march=athlon-|inlining with -march=athlon-
                   |xp  and size of 128         |xp  and size of 128


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


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

end of thread, other threads:[~2008-01-13 15:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-12 20:11 [Bug regression/26658] New: perfomance regression between gcc 3.4.5 and 4.* nbkolchin at gmail dot com
2006-03-12 20:12 ` [Bug regression/26658] " nbkolchin at gmail dot com
2006-03-12 20:13 ` nbkolchin at gmail dot com
2006-03-12 20:14 ` nbkolchin at gmail dot com
2006-03-12 21:07 ` rguenth at gcc dot gnu dot org
2006-03-12 21:12 ` rguenth at gcc dot gnu dot org
2006-06-04 19:52 ` [Bug regression/26658] [4.0/4.1/4.2 Regression] " jsm28 at gcc dot gnu dot org
2006-06-04 19:56 ` [Bug target/26658] " pinskia at gcc dot gnu dot org
2006-07-05 17:52 ` mmitchel at gcc dot gnu dot org
2006-08-27 21:59 ` [Bug target/26658] [4.0/4.1/4.2 Regression] memcpy/memset are not inlining with -march=athlon-xp and size of 128 pinskia at gcc dot gnu dot org
2007-02-14  9:10 ` [Bug target/26658] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2007-11-07  9:15 ` jakub at gcc dot gnu dot org
2008-01-13 15:42 ` [Bug target/26658] [4.1/4.2/4.3 " rguenth 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).