aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorEugene Rozenfeld <erozen@microsoft.com>2022-11-21 13:33:38 -0800
committerEugene Rozenfeld <erozen@microsoft.com>2023-04-28 13:15:33 -0700
commit0c77a0909456034d34036aa22a8dfcf0258cfa2d (patch)
tree9dd6aee44439480c4c858d250b1d9156ed746c48 /gcc/lto
parent065be0ffbcd676b635d492f4679e635b6ece4fe4 (diff)
downloadgcc-0c77a0909456034d34036aa22a8dfcf0258cfa2d.zip
gcc-0c77a0909456034d34036aa22a8dfcf0258cfa2d.tar.gz
gcc-0c77a0909456034d34036aa22a8dfcf0258cfa2d.tar.bz2
Fix autoprofiledbootstrap build
1. Fix gcov version 2. Merge perf data collected when compiling the compiler and runtime libraries 3. Fix documentation typo Tested on x86_64-pc-linux-gnu. ChangeLog: * Makefile.in: Define PROFILE_MERGER * Makefile.tpl: Define PROFILE_MERGER gcc/c/ChangeLog: * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries gcc/cp/ChangeLog: * Make-lang.in: Merge perf data collected when compiling cc1plus and runtime libraries gcc/lto/ChangeLog: * Make-lang.in: Merge perf data collected when compiling lto1 and runtime libraries gcc/ChangeLog: * doc/install.texi: Fix documentation typo
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/Make-lang.in32
1 files changed, 29 insertions, 3 deletions
diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in
index b3b965e..4f60251 100644
--- a/gcc/lto/Make-lang.in
+++ b/gcc/lto/Make-lang.in
@@ -74,7 +74,7 @@ lto.srcinfo:
lto.install-plugin:
lto.mostlyclean:
- rm -f $(LTO_OBJS) $(LTO_EXE) lto1.fda $(LTO_DUMP_OBJS) $(LTO_DUMP_EXE) lto-dump.fda
+ rm -f $(LTO_OBJS) $(LTO_EXE) lto1*.fda $(LTO_DUMP_OBJS) $(LTO_DUMP_EXE) lto-dump.fda
lto.clean:
lto.distclean:
@@ -105,8 +105,34 @@ $(LTO_DUMP_EXE): $(LTO_DUMP_OBJS) $(BACKEND) $(LIBDEPS) $(lto2.prev)
lto/lto-dump.o: $(LTO_OBJS)
-lto1.fda: ../prev-gcc/lto1$(exeext) ../prev-gcc/$(PERF_DATA)
- $(CREATE_GCOV) -binary ../prev-gcc/lto1$(exeext) -gcov lto1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1
+components_in_prev = "bfd opcodes binutils fixincludes gas gcc gmp mpfr mpc isl gold intl ld libbacktrace libcpp libcody libdecnumber libiberty libiberty-linker-plugin libiconv zlib lto-plugin libctf libsframe"
+components_in_prev_target = "libstdc++-v3 libsanitizer libvtv libgcc libbacktrace libphobos zlib libgomp libatomic"
+
+.PHONY: create_fdas_for_lto1
+
+lto1.fda: create_fdas_for_lto1
+ $(PROFILE_MERGER) $(shell ls -ha lto1_*.fda) --output_file lto1.fda -gcov_version 2
+
+create_fdas_for_lto1: ../stage1-gcc/lto1$(exeext) ../prev-gcc/$(PERF_DATA)
+ for component_in_prev in "$(components_in_prev)"; do \
+ perf_path=../prev-$$component_in_prev/$(PERF_DATA); \
+ echo "Perf path:"; \
+ echo $$perf_path; \
+ if [ -f $$perf_path ]; then \
+ profile_name=lto1_$$component_in_prev.fda; \
+ $(CREATE_GCOV) -binary ../stage1-gcc/lto1$(exeext) -gcov $$profile_name -profile $$perf_path -gcov_version 2; \
+ fi; \
+ done;
+
+ for component_in_prev_target in "$(components_in_prev_target)"; do \
+ perf_path=../prev-$(TARGET_SUBDIR)/$$component_in_prev_target/$(PERF_DATA); \
+ echo "Perf path:"; \
+ echo $$perf_path; \
+ if [ -f $$perf_path ]; then \
+ profile_name=lto1_$$component_in_prev_target.fda; \
+ $(CREATE_GCOV) -binary ../stage1-gcc/lto1$(exeext) -gcov $$profile_name -profile $$perf_path -gcov_version 2; \
+ fi; \
+ done;
# LTO testing is done as part of C/C++/Fortran etc. testing.
check-lto: