Is profiledbootstrap supposed to work currently? [PR bootstrap/14684]

Jan Hubicka hubicka@ucw.cz
Thu Oct 7 21:02:00 GMT 2004


> 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



More information about the Gcc mailing list