Commit 8f231b5d by Jan Hubicka Committed by Jan Hubicka

install.tex: Document profiledbootstrap.

	* install.tex: Document profiledbootstrap.

	* Makefile.tpl (profiledbootstrap): New target.
	* Makefile.in (profiledbootstrap): New target.

	* Makefile.in (clean, distclean): Kill new stages
	(POSTSTAGE1_FLAGS_TO_PASS): Break from ...
	(STAGE2_FLAGS_TO_PASS): ... this one.
	(STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS): New.
	(stage[2-4]_build): Add POSTSTAGE1_FLAGS_TO_PASS.
	(stageprofile_build, stageprofile_copy, stagefeedback_build,
	stagefeedback_copy): New.
	(restageprofile, restagefeedback, stageprofile-start,
	stageprofile, stagefeedback-start): Likewise.

	* Make-lang.in:  Add support for stageprofile and stagefeedback

From-SVN: r67498
parent 842a431a
Thu Jun 5 18:32:20 CEST 2003 Jan Hubicka <jh@suse.cz>
* Makefile.tpl (profiledbootstrap): New target.
* Makefile.in (profiledbootstrap): New target.
2003-06-05 Wolfgang Bangerth <bangerth@dealii.org> 2003-06-05 Wolfgang Bangerth <bangerth@dealii.org>
* MAINTAINERS (Bugzilla only): Add Dara Hazeghi and Andrew * MAINTAINERS (Bugzilla only): Add Dara Hazeghi and Andrew
......
...@@ -23776,6 +23776,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc ...@@ -23776,6 +23776,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \ echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
profiledbootstrap: all-bootstrap configure-gcc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
echo "Bootstrapping the compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries and training compiler"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
echo "Building feedback based compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
.PHONY: cross .PHONY: cross
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@r=`${PWD}`; export r; \ @r=`${PWD}`; export r; \
......
...@@ -1255,6 +1255,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc ...@@ -1255,6 +1255,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \ echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
profiledbootstrap: all-bootstrap configure-gcc
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
echo "Bootstrapping the compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries and training compiler"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
echo "Building feedback based compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
.PHONY: cross .PHONY: cross
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@r=`${PWD}`; export r; \ @r=`${PWD}`; export r; \
......
Thu Jun 5 18:32:46 CEST 2003 Jan Hubicka <jh@suse.cz>
* install.tex: Document profiledbootstrap.
* Makefile.in (clean, distclean): Kill new stages
(POSTSTAGE1_FLAGS_TO_PASS): Break from ...
(STAGE2_FLAGS_TO_PASS): ... this one.
(STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS): New.
(stage[2-4]_build): Add POSTSTAGE1_FLAGS_TO_PASS.
(stageprofile_build, stageprofile_copy, stagefeedback_build,
stagefeedback_copy): New.
(restageprofile, restagefeedback, stageprofile-start,
stageprofile, stagefeedback-start): Likewise.
2003-06-05 David Miller <davem@redhat.com> 2003-06-05 David Miller <davem@redhat.com>
Richard Henderson <rth@redhat.com> Richard Henderson <rth@redhat.com>
......
...@@ -2831,7 +2831,7 @@ clean: mostlyclean $(INTL_CLEAN) lang.clean ...@@ -2831,7 +2831,7 @@ clean: mostlyclean $(INTL_CLEAN) lang.clean
else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \ else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \ rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
fi ; fi fi ; fi
-rm -fr stage1 stage2 stage3 stage4 -rm -fr stage1 stage2 stage3 stage4 stageprofile stagefeedback
# Delete stamps of bootstrap stages # Delete stamps of bootstrap stages
-rm -f stage?_* -rm -f stage?_*
-rm -f clean?_* -rm -f clean?_*
...@@ -2847,7 +2847,7 @@ distclean: clean $(INTL_DISTCLEAN) lang.distclean ...@@ -2847,7 +2847,7 @@ distclean: clean $(INTL_DISTCLEAN) lang.distclean
-rm -f Make-lang Make-hooks Make-host Make-target -rm -f Make-lang Make-hooks Make-host Make-target
-rm -f Makefile *.oaux -rm -f Makefile *.oaux
-rm -f gthr-default.h -rm -f gthr-default.h
-rm -f */stage1 */stage2 */stage3 */stage4 */include -rm -f */stage1 */stage2 */stage3 */stage4 */include */stageprofile */stagefeedback
-rm -f c-parse.output -rm -f c-parse.output
-rm -f *.asm -rm -f *.asm
-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
...@@ -3453,19 +3453,31 @@ VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*` ...@@ -3453,19 +3453,31 @@ VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*`
# Flags to pass to stage2 and later recursive makes. Note that the # Flags to pass to stage2 and later recursive makes. Note that the
# WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in # WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in
# the context of the stage_x rule. # the context of the stage_x rule.
STAGE2_FLAGS_TO_PASS = \
POSTSTAGE1_FLAGS_TO_PASS = \
ADAC="\$$(CC)" \ ADAC="\$$(CC)" \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CFLAGS="$(BOOT_CFLAGS)" \ CFLAGS="$(BOOT_CFLAGS)" \
LDFLAGS="$(BOOT_LDFLAGS)" \ LDFLAGS="$(BOOT_LDFLAGS)" \
WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \ WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \
WERROR="@WERROR@" \
STRICT_WARN="$(STRICT2_WARN)" \ STRICT_WARN="$(STRICT2_WARN)" \
libdir=$(libdir) \ libdir=$(libdir) \
LANGUAGES="$(LANGUAGES)" \ LANGUAGES="$(LANGUAGES)" \
MAKEOVERRIDES= \ MAKEOVERRIDES= \
OUTPUT_OPTION="-o \$$@" OUTPUT_OPTION="-o \$$@"
STAGE2_FLAGS_TO_PASS = \
CFLAGS="$(BOOT_CFLAGS)" \
WERROR="@WERROR@" \
STAGEPROFILE_FLAGS_TO_PASS = \
CFLAGS="$(BOOT_CFLAGS) -fprofile-arcs"
# Files never linked into the final executable produces warnings about missing
# profile.
STAGEFEEDBACK_FLAGS_TO_PASS = \
CFLAGS="$(BOOT_CFLAGS) -fbranch-probabilities"
# Only build the C compiler for stage1, because that is the only one that # Only build the C compiler for stage1, because that is the only one that
# we can guarantee will build with the native compiler, and also it is the # we can guarantee will build with the native compiler, and also it is the
# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS), # only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
...@@ -3487,6 +3499,7 @@ stage1_copy: stage1_build ...@@ -3487,6 +3499,7 @@ stage1_copy: stage1_build
stage2_build: stage1_copy stage2_build: stage1_copy
$(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage1/ \ STAGE_PREFIX=stage1/ \
$(POSTSTAGE1_FLAGS_TO_PASS) \
$(STAGE2_FLAGS_TO_PASS) $(STAGE2_FLAGS_TO_PASS)
$(STAMP) stage2_build $(STAMP) stage2_build
echo stage2_build > stage_last echo stage2_build > stage_last
...@@ -3496,13 +3509,48 @@ stage2_copy: stage2_build ...@@ -3496,13 +3509,48 @@ stage2_copy: stage2_build
$(STAMP) stage2_copy $(STAMP) stage2_copy
echo stage3_build > stage_last echo stage3_build > stage_last
stageprofile_build: stage1_copy
$(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage1/ \
$(POSTSTAGE1_FLAGS_TO_PASS) \
$(STAGEPROFILE_FLAGS_TO_PASS)
$(STAMP) stageprofile_build
echo stageprofile_build > stage_last
stageprofile_copy: stageprofile_build
$(MAKE) stageprofile
$(STAMP) stageprofile_copy
echo stagefeedback_build > stage_last
stage3_build: stage2_copy stage3_build: stage2_copy
$(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage2/ \ STAGE_PREFIX=stage2/ \
$(POSTSTAGE1_FLAGS_TO_PASS) \
$(STAGE2_FLAGS_TO_PASS) $(STAGE2_FLAGS_TO_PASS)
$(STAMP) stage3_build $(STAMP) stage3_build
echo stage3_build > stage_last echo stage3_build > stage_last
stagefeedback_build: stageprofile_copy stage1_copy
$(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage1/ \
$(POSTSTAGE1_FLAGS_TO_PASS) \
$(STAGEFEEDBACK_FLAGS_TO_PASS)
$(STAMP) stagefeedback_build
echo stagefeedback_build > stage_last
stagefeedback_copy: stagefeedback_build
$(MAKE) stagefeedback
$(STAMP) stagefeedback_copy
echo stagefeedback2_build > stage_last
stageprofile_build: stage1_copy
$(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage1/ \
$(POSTSTAGE1_FLAGS_TO_PASS) \
$(STAGEPROFILE_FLAGS_TO_PASS)
$(STAMP) stageprofile_build
echo stageprofile_build > stage_last
# For bootstrap4: # For bootstrap4:
stage3_copy: stage3_build stage3_copy: stage3_build
$(MAKE) stage3 $(MAKE) stage3
...@@ -3512,6 +3560,7 @@ stage3_copy: stage3_build ...@@ -3512,6 +3560,7 @@ stage3_copy: stage3_build
stage4_build: stage3_copy stage4_build: stage3_copy
$(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \
STAGE_PREFIX=stage3/ \ STAGE_PREFIX=stage3/ \
$(POSTSTAGE1_FLAGS_TO_PASS) \
$(STAGE2_FLAGS_TO_PASS) $(STAGE2_FLAGS_TO_PASS)
$(STAMP) stage4_build $(STAMP) stage4_build
echo stage4_build > stage_last echo stage4_build > stage_last
...@@ -3547,7 +3596,7 @@ bootstrap3 bootstrap3-lean: bootstrap ...@@ -3547,7 +3596,7 @@ bootstrap3 bootstrap3-lean: bootstrap
bootstrap4 bootstrap4-lean: stage4_build bootstrap4 bootstrap4-lean: stage4_build
unstage1 unstage2 unstage3 unstage4: unstage1 unstage2 unstage3 unstage4 unstageprofile unstagefeedback:
-set -vx; stage=`echo $@ | sed -e 's/un//'`; \ -set -vx; stage=`echo $@ | sed -e 's/un//'`; \
rm -f $$stage/as$(exeext); \ rm -f $$stage/as$(exeext); \
rm -f $$stage/ld$(exeext); \ rm -f $$stage/ld$(exeext); \
...@@ -3578,6 +3627,12 @@ restage3: unstage3 ...@@ -3578,6 +3627,12 @@ restage3: unstage3
restage4: unstage4 restage4: unstage4
$(MAKE) LANGUAGES="$(LANGUAGES)" stage4_build $(MAKE) LANGUAGES="$(LANGUAGES)" stage4_build
restageprofile: unstageprofile
$(MAKE) LANGUAGES="$(LANGUAGES)" stageprofile_build
restagefeedback: unstagefeedback
$(MAKE) LANGUAGES="$(LANGUAGES)" stagefeedback_build
bubblestrap: bubblestrap:
if test -f stage3_build; then true; else \ if test -f stage3_build; then true; else \
echo; echo You must \"make bootstrap\" first.; \ echo; echo You must \"make bootstrap\" first.; \
...@@ -3812,6 +3867,63 @@ stage4-start: ...@@ -3812,6 +3867,63 @@ stage4-start:
fi; done fi; done
stage4: force stage4-start lang.stage4 stage4: force stage4-start lang.stage4
stageprofile-start:
-if [ -d stageprofile ] ; then true ; else mkdir stageprofile ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stageprofile
-for dir in intl $(SUBDIRS) ; \
do \
if [ -d stageprofile/$$dir ] ; then true ; else mkdir stageprofile/$$dir ; fi ; \
done
-mv $(STAGESTUFF) stageprofile
-mv intl/*$(objext) stageprofile/intl
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stageprofile && $(LN_S) ../as$(exeext) .) ; else true ; fi
-if [ -f ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../ld$(exeext) .) ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stageprofile/libgcc.a stageprofile/libgcov.a stageprofile/libgcc_eh.a
-cp libgcc.a stageprofile
-$(RANLIB_FOR_TARGET) stageprofile/libgcc.a
-cp libgcov.a stageprofile
-$(RANLIB_FOR_TARGET) stageprofile/libgcov.a
-if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stageprofile; \
$(RANLIB_FOR_TARGET) stageprofile/libgcc_eh.a; \
fi
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stageprofile/$${f} . ; \
else true; \
fi; done
stageprofile: force stageprofile-start lang.stageprofile
stagefeedback-start:
-if [ -d stagefeedback ] ; then true ; else mkdir stagefeedback ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stagefeedback
-for dir in intl $(SUBDIRS) ; \
do \
if [ -d stagefeedback/$$dir ] ; then true ; else mkdir stagefeedback/$$dir ; fi ; \
done
-mv $(STAGESTUFF) stagefeedback
-mv intl/*$(objext) stagefeedback/intl
# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
# dir will work properly.
-if [ -f as$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../as$(exeext) .) ; else true ; fi
-if [ -f ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../ld$(exeext) .) ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stagefeedback/libgcc.a stagefeedback/libgcov.a stagefeedback/libgcc_eh.a
-rm -f *.da ada/*.da cp/*.da f/*.da java/*.da objc/*.da fixinc/*.da intl po testsuite 2>/dev/null
-cp libgcc.a stagefeedback
-$(RANLIB_FOR_TARGET) stagefeedback/libgcc.a
-cp libgcov.a stagefeedback
-$(RANLIB_FOR_TARGET) stagefeedback/libgcov.a
-if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stagefeedback; \
$(RANLIB_FOR_TARGET) stagefeedback/libgcc_eh.a; \
fi
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stagefeedback/$${f} . ; \
else true; \
fi; done
stagefeedback: force stagefeedback-start lang.stagefeedback
# Copy just the executable files from a particular stage into a subdirectory, # Copy just the executable files from a particular stage into a subdirectory,
# and delete the object files. Use this if you're just verifying a version # and delete the object files. Use this if you're just verifying a version
# that is pretty sure to work, and you are short of disk space. # that is pretty sure to work, and you are short of disk space.
...@@ -3830,6 +3942,7 @@ risky-stage4: stage4 ...@@ -3830,6 +3942,7 @@ risky-stage4: stage4
#In GNU Make, ignore whether `stage*' exists. #In GNU Make, ignore whether `stage*' exists.
.PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
.PHONY: stagefeedback stageprofile
# Rules for generating translated message descriptions. # Rules for generating translated message descriptions.
# Disabled by autoconf if the tools are not available. # Disabled by autoconf if the tools are not available.
......
Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-06-05 Matt Kraai <kraai@alumni.cmu.edu> 2003-06-05 Matt Kraai <kraai@alumni.cmu.edu>
* bindgen.adb (Gen_Adafinal_C, Gen_Adainit_C, Gen_Elab_Defs_C) * bindgen.adb (Gen_Adafinal_C, Gen_Adainit_C, Gen_Elab_Defs_C)
......
...@@ -808,6 +808,12 @@ ada.stage3: stage3-start ...@@ -808,6 +808,12 @@ ada.stage3: stage3-start
ada.stage4: stage4-start ada.stage4: stage4-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stage4/ada -$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stage4/ada
-$(MV) ada/stamp-* stage4/ada -$(MV) ada/stamp-* stage4/ada
ada.stageprofile: stageprofile-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stageprofile/ada
-$(MV) ada/stamp-* stageprofile/ada
ada.stagefeedback: stagefeedback-start
-$(MV) ada/*$(objext) ada/*.ali ada/b_*.c stagefeedback/ada
-$(MV) ada/stamp-* stagefeedback/ada
check-ada: check-ada:
......
...@@ -8892,7 +8892,7 @@ target_list="all.build all.cross start.encap rest.encap tags \ ...@@ -8892,7 +8892,7 @@ target_list="all.build all.cross start.encap rest.encap tags \
install-normal install-common install-info install-man \ install-normal install-common install-info install-man \
uninstall \ uninstall \
mostlyclean clean distclean extraclean maintainer-clean \ mostlyclean clean distclean extraclean maintainer-clean \
stage1 stage2 stage3 stage4" stage1 stage2 stage3 stage4 stageprofile stagefeedback"
for t in $target_list for t in $target_list
do do
x= x=
...@@ -9656,7 +9656,7 @@ if test "$symbolic_link" = "ln -s"; then ...@@ -9656,7 +9656,7 @@ if test "$symbolic_link" = "ln -s"; then
if test $d != ..; then if test $d != ..; then
STARTDIR=`${PWDCMD-pwd}` STARTDIR=`${PWDCMD-pwd}`
cd $d cd $d
for t in stage1 stage2 stage3 stage4 include for t in stage1 stage2 stage3 stage4 include stageprofile stagefeedback
do do
rm -f $t rm -f $t
$symbolic_link ../$t $t 2>/dev/null $symbolic_link ../$t $t 2>/dev/null
......
...@@ -3014,7 +3014,7 @@ target_list="all.build all.cross start.encap rest.encap tags \ ...@@ -3014,7 +3014,7 @@ target_list="all.build all.cross start.encap rest.encap tags \
install-normal install-common install-info install-man \ install-normal install-common install-info install-man \
uninstall \ uninstall \
mostlyclean clean distclean extraclean maintainer-clean \ mostlyclean clean distclean extraclean maintainer-clean \
stage1 stage2 stage3 stage4" stage1 stage2 stage3 stage4 stageprofile stagefeedback"
for t in $target_list for t in $target_list
do do
x= x=
...@@ -3230,7 +3230,7 @@ if test "$symbolic_link" = "ln -s"; then ...@@ -3230,7 +3230,7 @@ if test "$symbolic_link" = "ln -s"; then
if test $d != ..; then if test $d != ..; then
STARTDIR=`${PWDCMD-pwd}` STARTDIR=`${PWDCMD-pwd}`
cd $d cd $d
for t in stage1 stage2 stage3 stage4 include for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
do do
rm -f $t rm -f $t
$symbolic_link ../$t $t 2>/dev/null $symbolic_link ../$t $t 2>/dev/null
......
Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-06-04 J"orn Rennecke <joern.rennecke@superh.com> 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
* decl.c (grokdeclarator): Error_mark_node in, error_mark_node out. * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
......
...@@ -218,6 +218,10 @@ c++.stage3: stage3-start ...@@ -218,6 +218,10 @@ c++.stage3: stage3-start
-mv cp/*$(objext) stage3/cp -mv cp/*$(objext) stage3/cp
c++.stage4: stage4-start c++.stage4: stage4-start
-mv cp/*$(objext) stage4/cp -mv cp/*$(objext) stage4/cp
c++.stageprofile: stageprofile-start
-mv cp/*$(objext) stageprofile/cp
c++.stagefeedback: stagefeedback-start
-mv cp/*$(objext) stagefeedback/cp
# #
# .o: .h dependencies. # .o: .h dependencies.
......
...@@ -1202,6 +1202,24 @@ following commands (assuming @command{make} is GNU make): ...@@ -1202,6 +1202,24 @@ following commands (assuming @command{make} is GNU make):
Currently, when compiling the Ada front end, you cannot use the parallel Currently, when compiling the Ada front end, you cannot use the parallel
build feature described in the previous section. build feature described in the previous section.
@section Building with profile feedback
It is possible to use profile feedback to optimize the compiler itself. This
should result in a faster compiler binary. Experiments done on x86 using gcc
3.3 showed approximately 7 percent speedup on compiling C programs. To
bootstrap compiler with profile feedback, use @code{make profiledbootstrap}.
When @samp{make profiledbootstrap} is run, it will first build a @code{stage1}
compiler. This compiler is used to build a @code{stageprofile} compiler
instrumented to collect execution counts of instruction and branch
probabilities. Then runtime libraries are compiled with profile collected.
Finally a @code{stagefeedback} compiler is built using the information collected.
Unlike @samp{make bootstrap} several additional restrictions apply. The
compiler used to build @code{stage1} needs to support a 64-bit integral type.
It is recommended to only use GCC for this. Also parallel make is currently
not supported since collisions in profile collecting may occur.
@html @html
<hr /> <hr />
<p> <p>
......
Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-06-04 Andreas Jaeger <aj@suse.de> 2003-06-04 Andreas Jaeger <aj@suse.de>
* g77spec.c (lang_specific_driver): Remove ALT_LIBM usage. * g77spec.c (lang_specific_driver): Remove ALT_LIBM usage.
......
...@@ -63,7 +63,8 @@ F77 f77: f771$(exeext) ...@@ -63,7 +63,8 @@ F77 f77: f771$(exeext)
f77.install-common f77.install-info f77.install-man \ f77.install-common f77.install-info f77.install-man \
f77.uninstall f77.mostlyclean f77.clean f77.distclean \ f77.uninstall f77.mostlyclean f77.clean f77.distclean \
f77.extraclean f77.maintainer-clean f77.rebuilt \ f77.extraclean f77.maintainer-clean f77.rebuilt \
f77.stage1 f77.stage2 f77.stage3 f77.stage4 f77.stage1 f77.stage2 f77.stage3 f77.stage4 \
f77.stageprofile f77.stagefeedback
g77spec.o: $(srcdir)/f/g77spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \ g77spec.o: $(srcdir)/f/g77spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) \
$(CONFIG_H) $(CONFIG_H)
...@@ -349,6 +350,11 @@ f77.stage3: stage3-start ...@@ -349,6 +350,11 @@ f77.stage3: stage3-start
f77.stage4: stage4-start f77.stage4: stage4-start
-mv -f $(G77STAGESTUFF) stage4/f -mv -f $(G77STAGESTUFF) stage4/f
f77.stageprofile: stageprofile-start
-mv -f $(G77STAGESTUFF) stageprofile/f
f77.stagefeedback: stageprofile-start
-mv -f $(G77STAGESTUFF) stagefeedback/f
# #
# .o: .h dependencies. # .o: .h dependencies.
......
Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-05-31 Roger Sayle <roger@eyesopen.com> 2003-05-31 Roger Sayle <roger@eyesopen.com>
* lang.c (java_init_options): Prescribe wrap-around two's * lang.c (java_init_options): Prescribe wrap-around two's
......
...@@ -263,6 +263,10 @@ java.stage3: stage3-start ...@@ -263,6 +263,10 @@ java.stage3: stage3-start
-mv java/*$(objext) stage3/java -mv java/*$(objext) stage3/java
java.stage4: stage4-start java.stage4: stage4-start
-mv java/*$(objext) stage4/java -mv java/*$(objext) stage4/java
java.stageprofile: stageprofile-start
-mv java/*$(objext) stageprofile/java
java.stagefeedback: stageprofile-start
-mv java/*$(objext) stagefeedback/java
# #
# .o:.h dependencies. # .o:.h dependencies.
......
...@@ -156,3 +156,9 @@ objc.stage3: stage3-start ...@@ -156,3 +156,9 @@ objc.stage3: stage3-start
objc.stage4: stage4-start objc.stage4: stage4-start
-mv objc/*$(objext) stage4/objc -mv objc/*$(objext) stage4/objc
-mv cc1obj$(exeext) stage4 -mv cc1obj$(exeext) stage4
objc.stageprofile: stageprofile-start
-mv objc/*$(objext) stageprofile/objc
-mv cc1obj$(exeext) stageprofile
objc.stagefeedback: stagefeedback-start
-mv objc/*$(objext) stagefeedback/objc
-mv cc1obj$(exeext) stagefeedback
Thu Jun 5 18:33:40 CEST 2003 Jan Hubicka <jh@suse.cz>
* Make-lang.in: Add support for stageprofile and stagefeedback
2003-05-21 Nathan Sidwell <nathan@codesourcery.com> 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
* treetree.c (reswords): Remove __bounded__, __unbounded__. * treetree.c (reswords): Remove __bounded__, __unbounded__.
......
...@@ -266,6 +266,10 @@ treelang.stage3: stage3-start ...@@ -266,6 +266,10 @@ treelang.stage3: stage3-start
-mv treelang/*$(objext) stage3/treelang -mv treelang/*$(objext) stage3/treelang
treelang.stage4: stage4-start treelang.stage4: stage4-start
-mv treelang/*$(objext) stage4/treelang -mv treelang/*$(objext) stage4/treelang
treelang.stageprofile: stageprofile-start
-mv treelang/*$(objext) stageprofile/treelang
treelang.stagefeedback: stagefeedback-start
-mv treelang/*$(objext) stagefeedback/treelang
# #
# Maintenance hooks: # Maintenance hooks:
......
/* config.hin. Generated automatically from configure.in by autoheader. */ /* config.hin. Generated automatically from configure.in by autoheader 2.13. */
/* Define to empty if the keyword does not work. */ /* Define to empty if the keyword does not work. */
#undef const #undef const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment