public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pending/23378] New: code quality regression for complicated loop
@ 2005-08-13 18:03 martin at mpa-garching dot mpg dot de
  2005-08-13 18:05 ` [Bug pending/23378] " martin at mpa-garching dot mpg dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-08-13 18:03 UTC (permalink / raw)
  To: gcc-bugs

A code quality regression was introduced into CVS between the timestamps
"-D 20050729 22:00:00 UT" and "-D 20050729 23:00:00 UT". It appears that
it iss caused by Jan Hubicka's patch from
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg02021.html

If the attached testcase is compiled with the newer compiler, the runtime
of the generated executable is more than 50 per cent higher:

old compiler:

~/tmp/tmp2>g++ -O3 -march=pentium4 -mfpmath=sse testcase.cc
~/tmp/tmp2>time ./a.out
14.250u 0.020s 0:14.27 100.0%   0+0k 0+0io 205pf+0w


new compiler:

~/tmp/tmp2>g++ -O3 -march=pentium4 -mfpmath=sse testcase.cc
~/tmp/tmp2>time ./a.out
22.430u 0.030s 0:22.46 100.0%   0+0k 0+0io 205pf+0w


Both compilers have the same "g++ -v" output:

~/tmp/tmp2>g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /scratch/gcc/configure --quiet
--prefix=/afs/mpa/data/martin/ugcc --enable-languages=c++
--enable-mapped-location --disable-checking
Thread model: posix
gcc version 4.1.0 20050729 (experimental)


The hot spot of the code is the strange "loop" in lines 134-139
of alm_map_tools_orig.cc.

-- 
           Summary: code quality regression for complicated loop
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: pending
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org,martin at mpa-garching
                    dot mpg dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug pending/23378] code quality regression for complicated loop
  2005-08-13 18:03 [Bug pending/23378] New: code quality regression for complicated loop martin at mpa-garching dot mpg dot de
@ 2005-08-13 18:05 ` martin at mpa-garching dot mpg dot de
  2005-08-13 18:06 ` [Bug target/23378] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-08-13 18:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From martin at mpa-garching dot mpg dot de  2005-08-13 18:05 -------
Created an attachment (id=9494)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9494&action=view)
A testcase for the problem


-- 


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
  2005-08-13 18:03 [Bug pending/23378] New: code quality regression for complicated loop martin at mpa-garching dot mpg dot de
  2005-08-13 18:05 ` [Bug pending/23378] " martin at mpa-garching dot mpg dot de
@ 2005-08-13 18:06 ` pinskia at gcc dot gnu dot org
  2005-08-14 13:57 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-13 18:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org
          Component|pending                     |target
            Summary|code quality regression for |[4.1 Regression] code
                   |complicated loop            |quality regression for
                   |                            |complicated loop
   Target Milestone|---                         |4.1.0


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
  2005-08-13 18:03 [Bug pending/23378] New: code quality regression for complicated loop martin at mpa-garching dot mpg dot de
  2005-08-13 18:05 ` [Bug pending/23378] " martin at mpa-garching dot mpg dot de
  2005-08-13 18:06 ` [Bug target/23378] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-14 13:57 ` steven at gcc dot gnu dot org
  2005-08-14 14:07 ` pinskia at gcc dot gnu dot org
  2005-08-16  8:38 ` martin at mpa-garching dot mpg dot de
  4 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-14 13:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-08-14 13:57 -------
Ouch.  This badly needs reducing... 

-- 


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
  2005-08-13 18:03 [Bug pending/23378] New: code quality regression for complicated loop martin at mpa-garching dot mpg dot de
                   ` (2 preceding siblings ...)
  2005-08-14 13:57 ` steven at gcc dot gnu dot org
@ 2005-08-14 14:07 ` pinskia at gcc dot gnu dot org
  2005-08-16  8:38 ` martin at mpa-garching dot mpg dot de
  4 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-14 14:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-14 14:06 -------
I think this is related to PR 23302 and PR 23303 since those look like they were caused by the same 
patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |23302, 23303


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
  2005-08-13 18:03 [Bug pending/23378] New: code quality regression for complicated loop martin at mpa-garching dot mpg dot de
                   ` (3 preceding siblings ...)
  2005-08-14 14:07 ` pinskia at gcc dot gnu dot org
@ 2005-08-16  8:38 ` martin at mpa-garching dot mpg dot de
  4 siblings, 0 replies; 10+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-08-16  8:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From martin at mpa-garching dot mpg dot de  2005-08-16 08:33 -------
(In reply to comment #2)
> Ouch.  This badly needs reducing... 

Absolutely. But since Andrew pointed out that it is probably related to PR 23302
and PR 23303 (which have nice testcases), I suggest I wait until these are fixed.
If, after that, the performance regression persists, I'll try to reduce the
testcase. Is that OK?

-- 


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
       [not found] <bug-23378-2736@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-31 18:24 ` hubicka at gcc dot gnu dot org
@ 2005-11-01 10:23 ` martin at mpa-garching dot mpg dot de
  3 siblings, 0 replies; 10+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-11-01 10:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from martin at mpa-garching dot mpg dot de  2005-11-01 10:22 -------
The regression is unfortunately still there :(
Reducing the testcase is really hard, and I have some indications
that the problem vanishes if there is less work to do in the critical loop.
If you have any suggestion how to proceed, they would be greatly appreciated
...


-- 


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
       [not found] <bug-23378-2736@http.gcc.gnu.org/bugzilla/>
  2005-10-16 22:42 ` pinskia at gcc dot gnu dot org
  2005-10-31  5:01 ` mmitchel at gcc dot gnu dot org
@ 2005-10-31 18:24 ` hubicka at gcc dot gnu dot org
  2005-11-01 10:23 ` martin at mpa-garching dot mpg dot de
  3 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2005-10-31 18:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hubicka at gcc dot gnu dot org  2005-10-31 18:24 -------
I don't have P4 to test handy.  Can you re-test whether fixing 23302 (23303 is
invalid) make any difference?
I doubt these two make actual runtime changes - the sequence would translate to
same uops for P4 and should execute in about the same time.


-- 


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
       [not found] <bug-23378-2736@http.gcc.gnu.org/bugzilla/>
  2005-10-16 22:42 ` pinskia at gcc dot gnu dot org
@ 2005-10-31  5:01 ` mmitchel at gcc dot gnu dot org
  2005-10-31 18:24 ` hubicka at gcc dot gnu dot org
  2005-11-01 10:23 ` martin at mpa-garching dot mpg dot de
  3 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  5:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2005-10-31 05:01 -------
Leaving as P2.


-- 


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


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

* [Bug target/23378] [4.1 Regression] code quality regression for complicated loop
       [not found] <bug-23378-2736@http.gcc.gnu.org/bugzilla/>
@ 2005-10-16 22:42 ` pinskia at gcc dot gnu dot org
  2005-10-31  5:01 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-16 22:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |i?86-*-*


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


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

end of thread, other threads:[~2005-11-01 10:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-13 18:03 [Bug pending/23378] New: code quality regression for complicated loop martin at mpa-garching dot mpg dot de
2005-08-13 18:05 ` [Bug pending/23378] " martin at mpa-garching dot mpg dot de
2005-08-13 18:06 ` [Bug target/23378] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-14 13:57 ` steven at gcc dot gnu dot org
2005-08-14 14:07 ` pinskia at gcc dot gnu dot org
2005-08-16  8:38 ` martin at mpa-garching dot mpg dot de
     [not found] <bug-23378-2736@http.gcc.gnu.org/bugzilla/>
2005-10-16 22:42 ` pinskia at gcc dot gnu dot org
2005-10-31  5:01 ` mmitchel at gcc dot gnu dot org
2005-10-31 18:24 ` hubicka at gcc dot gnu dot org
2005-11-01 10:23 ` martin at mpa-garching dot mpg dot de

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