public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov/profile/24487]  New: Basic block frequencies inaccurate
@ 2005-10-22 20:24 dje at gcc dot gnu dot org
  2005-10-23 20:11 ` [Bug gcov/profile/24487] [Regression 3.4/4.0/4.1] " dje at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-10-22 20:24 UTC (permalink / raw)
  To: gcc-bugs

The basic block frequencies used when compiling without profiling information
appear to be non-sensical.  For instance, a case where block 0 is fed by the
entry block but has a frequency of 0.  This causes EDGE_FREQUENCY to return
zero, which affects optimizations such as final.c:compute_alignments().

An example is deflate.c from gzip-1.2.4a.  Compiled with GCC mainline on
powerpc-linux with options

-m32 -O3 -mcpu=power4 -ffast-math -funroll-loops -fpeel-loops
-ftree-loop-linear

deflate.c.50.compgotos shows the following information for function deflate:

Reordered sequence:
 0 bb 0  [0]
 1 bb 1  [0]
 2 bb 2  [1]
 3 bb 3  [1]
 4 bb 4  [0]
 5 bb 5  [0]
 6 bb 6  [0]
 7 bb 7  [0]
 8 bb 8  [0]
 9 bb 9  [0]
 10 bb 10  [0]
 11 bb 11  [0]
 12 bb 12  [0]
 13 bb 13  [0]
 14 bb 14  [0]
 15 bb 15  [0]
 16 bb 16  [0]
 17 bb 17  [0]
 18 bb 18  [1]
 19 bb 19  [0]
 20 bb 20  [0]
 21 bb 21  [0]
 22 bb 22  [5]
 23 bb 23  [5]
 24 bb 24  [5]
 25 bb 25  [3]
 26 bb 26  [4]
 27 bb 27  [4]
 28 bb 28  [2]
 29 bb 29  [1]
 30 bb 30  [1250]
 31 bb 31  [625]
 32 bb 32  [1250]
 33 bb 33  [625]
 34 bb 34  [1250]
 35 bb 35  [625]
 36 bb 36  [1250]
 37 bb 37  [625]
 38 bb 38  [1250]
 39 bb 39  [625]
 40 bb 40  [1250]
...

Basic blocks 10-11 contain a critical loop, but the basic block frequencies
misrepresent it as a very cold block.


-- 
           Summary: Basic block frequencies inaccurate
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P2
         Component: gcov/profile
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dje at gcc dot gnu dot org
GCC target triplet: powerpc-*-*


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


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

end of thread, other threads:[~2005-11-03  8:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-22 20:24 [Bug gcov/profile/24487] New: Basic block frequencies inaccurate dje at gcc dot gnu dot org
2005-10-23 20:11 ` [Bug gcov/profile/24487] [Regression 3.4/4.0/4.1] " dje at gcc dot gnu dot org
2005-10-23 20:16 ` [Bug gcov/profile/24487] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-10-24 21:36 ` dje at gcc dot gnu dot org
2005-10-28 16:32 ` hubicka at gcc dot gnu dot org
2005-10-28 17:31 ` dje at gcc dot gnu dot org
2005-10-28 21:29 ` hubicka at ucw dot cz
2005-10-31  6:39 ` mmitchel at gcc dot gnu dot org
2005-10-31 14:49 ` hubicka at gcc dot gnu dot org
2005-10-31 14:54 ` hubicka at gcc dot gnu dot org
2005-11-03  8:22 ` [Bug gcov/profile/24487] [3.4/4.0 " hubicka 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).