public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Is profiledbootstrap supposed to work currently?
@ 2004-10-05 15:55 Richard Guenther
  2004-10-05 16:16 ` Andrew Pinski
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Guenther @ 2004-10-05 15:55 UTC (permalink / raw)
  To: gcc

Trying profiledbootstrap today on ia32-linux leads to

stage1/xgcc -Bstage1/
-B/home/rguenth/ix86/gcc3.5-051004/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    -DHAVE_CONFIG_H
-I. -I. -I/home/rguenth/src/gcc/gcc3.5/gcc
-I/home/rguenth/src/gcc/gcc3.5/gcc/.
-I/home/rguenth/src/gcc/gcc3.5/gcc/../include
-I/home/rguenth/src/gcc/gcc3.5/gcc/../libcpp/include
/home/rguenth/src/gcc/gcc3.5/gcc/attribs.c -o attribs.o
/home/rguenth/src/gcc/gcc3.5/gcc/attribs.c: In function 'decl_attributes':
/home/rguenth/src/gcc/gcc3.5/gcc/attribs.c:337: error: coverage mismatch
for function 'decl_attributes' while reading counter 'arcs'.
/home/rguenth/src/gcc/gcc3.5/gcc/attribs.c:337: error: number of counters
is 67 instead of 69
make[2]: *** [attribs.o] Error 1
make[2]: Leaving directory `/tmp/gcc-obj/gcc'
make[1]: *** [stagefeedback_build] Error 2
make[1]: Leaving directory `/tmp/gcc-obj/gcc'
make: *** [profiledbootstrap] Error 2

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

Thanks,
Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

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

* Re: Is profiledbootstrap supposed to work currently?
  2004-10-05 15:55 Is profiledbootstrap supposed to work currently? Richard Guenther
@ 2004-10-05 16:16 ` Andrew Pinski
  2004-10-05 23:08   ` Is profiledbootstrap supposed to work currently? [PR bootstrap/14684] Kelley Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pinski @ 2004-10-05 16:16 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc


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.

The correct fix is most likely not going to happen fully until 4.1 with
tree based profiling.

Thanks,
Andrew Pinski

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

* Re: Is profiledbootstrap supposed to work currently? [PR bootstrap/14684]
  2004-10-05 16:16 ` Andrew Pinski
@ 2004-10-05 23:08   ` Kelley Cook
  2004-10-07 21:02     ` Jan Hubicka
  0 siblings, 1 reply; 4+ messages in thread
From: Kelley Cook @ 2004-10-05 23:08 UTC (permalink / raw)
  To: Andrew Pinski, Richard Guenther
  Cc: GCC Mailing List, GCC Patches, GCC Bugzilla

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

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

[-- Attachment #2: pb.patch --]
[-- Type: text/plain, Size: 955 bytes --]

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;

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

* Re: Is profiledbootstrap supposed to work currently? [PR bootstrap/14684]
  2004-10-05 23:08   ` Is profiledbootstrap supposed to work currently? [PR bootstrap/14684] Kelley Cook
@ 2004-10-07 21:02     ` Jan Hubicka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Hubicka @ 2004-10-07 21:02 UTC (permalink / raw)
  To: Kelley Cook
  Cc: Andrew Pinski, Richard Guenther, GCC Mailing List, GCC Patches,
	GCC Bugzilla

> 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

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

end of thread, other threads:[~2004-10-07 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05 15:55 Is profiledbootstrap supposed to work currently? Richard Guenther
2004-10-05 16:16 ` Andrew Pinski
2004-10-05 23:08   ` Is profiledbootstrap supposed to work currently? [PR bootstrap/14684] Kelley Cook
2004-10-07 21:02     ` Jan Hubicka

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