public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch
       [not found] <20040322211035.14684.belyshev@lubercy.com>
@ 2004-10-05 14:24 ` pinskia at gcc dot gnu dot org
  2004-10-05 18:05 ` kcook at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-05 14:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-05 14:24 -------
This is now happens on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal
            Summary|[lno] -fprofile-use/-       |[4.0 Regression] -fprofile-
                   |fprofile-generate failure   |use/-fprofile-generate
                   |because of coverage mismatch|failure because of coverage
                   |                            |mismatch
   Target Milestone|lno                         |4.0.0


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


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

* [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch
       [not found] <20040322211035.14684.belyshev@lubercy.com>
  2004-10-05 14:24 ` [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch pinskia at gcc dot gnu dot org
@ 2004-10-05 18:05 ` kcook at gcc dot gnu dot org
  2004-10-07 18:08 ` hubicka at ucw dot cz
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: kcook at gcc dot gnu dot org @ 2004-10-05 18:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kcook at gcc dot gnu dot org  2004-10-05 18:05 -------
Subject: Re: Is profiledbootstrap supposed to work currently? [PR bootstrap/14684]

On Oct 5, 2004, at 10:22 AM, Richard Guenther wrote:

    Trying profiledbootstrap today on ia32-linux leads to

    is this supposed to happen at the moment, i.e. are there pending
    fixes, or
    is this a genuine bug? 

> This was caused by the fact -funroll-loops is supplied only when
> -fprofile-use is supplied and some unrolling is done on the tree level
> but profiling is done on the RTL level so there is a mismatch.

 >
 > This is PR 14684.
 >
 > A workaround is to change -fprofile-generate to imply -funroll-loops too.

I've attached the seemingly obvious cut-and-paste patch which causes 
-fprofile-generate to match the same options implied by -fprofile-use.

It does survive make bootstrap.  Unfortunately, it leads to a new 
problem when attempting a make profiledbootstrap:

stage1/xgcc.exe -Bstage1/ -B/usr/local/i686-pc-cygwin/bin/ -c   -g -O2 
-fprofile-generate -DIN_GCC   -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -fno-common   -DHAVE_CONFIG_H 
-DGENERATOR_FILE    -I. -Ibuild -I../../gcc-snapshot/gcc 
-I../../gcc-snapshot/gcc/build -I../../gcc-snapshot/gcc/../include 
-I../../gcc-snapshot/gcc/../libcpp/include -o build/gengtype.o 
../../gcc-snapshot/gcc/gengtype.c
../../gcc-snapshot/gcc/gengtype.c: In function 'get_base_file_bitmap':
../../gcc-snapshot/gcc/gengtype.c:1194: internal compiler error: 
Segmentation fault

I have a feeling that this patch is nevertheless correct and should be 
applied.

Kelley Cook
2004-10-05  Kelley Cook  <kcook@gcc.gnu.org>

	PR middle-end/14684
	* opts.c (OPT_fprofile_generate): Default to -funroll-loops,
	-fpeel-loops and -ftracer to match -fprofile-use.

--- gcc-orig/gcc/opts.c	2004-09-10 07:02:25.000000000 -0400
+++ gcc-snapshot/gcc/opts.c	2004-10-05 13:04:09.383317700 -0400
@@ -850,10 +850,16 @@ common_handle_option (size_t scode, cons
     case OPT_fprofile_generate:
       if (!profile_arc_flag_set)
         profile_arc_flag = value;
       if (!flag_profile_values_set)
         flag_profile_values = value;
+      if (!flag_unroll_loops_set)
+        flag_unroll_loops = value;
+      if (!flag_peel_loops_set)
+        flag_peel_loops = value;
+      if (!flag_tracer_set)
+        flag_tracer = value;
       if (!flag_value_profile_transformations_set)
         flag_value_profile_transformations = value;
 #ifdef HAVE_prefetch
       if (!flag_speculative_prefetching_set)
 	flag_speculative_prefetching = value;


-- 


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


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

* [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch
       [not found] <20040322211035.14684.belyshev@lubercy.com>
  2004-10-05 14:24 ` [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch pinskia at gcc dot gnu dot org
  2004-10-05 18:05 ` kcook at gcc dot gnu dot org
@ 2004-10-07 18:08 ` hubicka at ucw dot cz
  2004-10-22 19:37 ` bernie at develer dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: hubicka at ucw dot cz @ 2004-10-07 18:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hubicka at ucw dot cz  2004-10-07 18:08 -------
Subject: Re: Is profiledbootstrap supposed to work currently? [PR bootstrap/14684]

> On Oct 5, 2004, at 10:22 AM, Richard Guenther wrote:
> 
>    Trying profiledbootstrap today on ia32-linux leads to
> 
>    is this supposed to happen at the moment, i.e. are there pending
>    fixes, or
>    is this a genuine bug? 
> 
> >This was caused by the fact -funroll-loops is supplied only when
> >-fprofile-use is supplied and some unrolling is done on the tree level
> >but profiling is done on the RTL level so there is a mismatch.
> 
> >
> > This is PR 14684.
> >
> > A workaround is to change -fprofile-generate to imply -funroll-loops too.
> 
> I've attached the seemingly obvious cut-and-paste patch which causes 
> -fprofile-generate to match the same options implied by -fprofile-use.
> 
> It does survive make bootstrap.  Unfortunately, it leads to a new 
> problem when attempting a make profiledbootstrap:
> 
> stage1/xgcc.exe -Bstage1/ -B/usr/local/i686-pc-cygwin/bin/ -c   -g -O2 
> -fprofile-generate -DIN_GCC   -W -Wall -Wwrite-strings 
> -Wstrict-prototypes -Wmissing-prototypes -fno-common   -DHAVE_CONFIG_H 
> -DGENERATOR_FILE    -I. -Ibuild -I../../gcc-snapshot/gcc 
> -I../../gcc-snapshot/gcc/build -I../../gcc-snapshot/gcc/../include 
> -I../../gcc-snapshot/gcc/../libcpp/include -o build/gengtype.o 
> ../../gcc-snapshot/gcc/gengtype.c
> ../../gcc-snapshot/gcc/gengtype.c: In function 'get_base_file_bitmap':
> ../../gcc-snapshot/gcc/gengtype.c:1194: internal compiler error: 
> Segmentation fault
> 
> I have a feeling that this patch is nevertheless correct and should be 
> applied.

I would approve the patch with -funroll-loops only.  There is no need to
enable loop peeling and tracer when they are still done at RTL level.
Without profile feedback these can bring quite noticeable bloat that is
unnecesary at profiling stage.

Honza


-- 


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


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

* [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch
       [not found] <20040322211035.14684.belyshev@lubercy.com>
                   ` (2 preceding siblings ...)
  2004-10-07 18:08 ` hubicka at ucw dot cz
@ 2004-10-22 19:37 ` bernie at develer dot com
  2004-10-27 13:36 ` cvs-commit at gcc dot gnu dot org
  2004-10-27 13:42 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 6+ messages in thread
From: bernie at develer dot com @ 2004-10-22 19:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bernie at develer dot com  2004-10-22 19:37 -------
I still see this bug on mainline when doing a 
profiledbootstrap: 
 
stage1/xgcc -Bstage1/ 
-B/usr/local/src/gcc/i386-linux-HEAD-install/i686-pc-linux-gnu/bin/ -c   -O2 -g 
-fomit-frame-pointer -fprofile-use -DIN_GCC   -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long 
-Wno-variadic-macros -Wold-style-definition -Werror -fno-common   
-DHAVE_CONFIG_H    -I. -I. -I../../gcc-HEAD/gcc -I../../gcc-HEAD/gcc/. 
-I../../gcc-HEAD/gcc/../include 
-I../../gcc-HEAD/gcc/../libcpp/include  ../../gcc-HEAD/gcc/attribs.c -o 
attribs.o 
../../gcc-HEAD/gcc/attribs.c: In function 'decl_attributes': 
../../gcc-HEAD/gcc/attribs.c:337: error: coverage mismatch for function 
'decl_attributes' while reading counter 'arcs'. 
../../gcc-HEAD/gcc/attribs.c:337: error: number of counters is 109 instead of 
111 
gmake[2]: *** [attribs.o] Error 1 
 

-- 


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


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

* [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch
       [not found] <20040322211035.14684.belyshev@lubercy.com>
                   ` (3 preceding siblings ...)
  2004-10-22 19:37 ` bernie at develer dot com
@ 2004-10-27 13:36 ` cvs-commit at gcc dot gnu dot org
  2004-10-27 13:42 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-27 13:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-27 13:35 -------
Subject: Bug 14684

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	uweigand@gcc.gnu.org	2004-10-27 13:35:45

Modified files:
	gcc            : ChangeLog opts.c 

Log message:
	2004-10-27  Andreas Krebbel  <krebbel@de.ibm.com>
	patch originally created by Kelley Cook  <kcook@gcc.gnu.org>
	
	PR middle-end/14684
	* opts.c (OPT_fprofile_generate): Default to -funroll-loops
	to match -fprofile-use.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6037&r2=2.6038
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?cvsroot=gcc&r1=1.83&r2=1.84



-- 


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


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

* [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch
       [not found] <20040322211035.14684.belyshev@lubercy.com>
                   ` (4 preceding siblings ...)
  2004-10-27 13:36 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-27 13:42 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-27 13:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-27 13:42 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-10-27 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040322211035.14684.belyshev@lubercy.com>
2004-10-05 14:24 ` [Bug middle-end/14684] [4.0 Regression] -fprofile-use/-fprofile-generate failure because of coverage mismatch pinskia at gcc dot gnu dot org
2004-10-05 18:05 ` kcook at gcc dot gnu dot org
2004-10-07 18:08 ` hubicka at ucw dot cz
2004-10-22 19:37 ` bernie at develer dot com
2004-10-27 13:36 ` cvs-commit at gcc dot gnu dot org
2004-10-27 13:42 ` pinskia 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).