gh-104523: Inline minimal PGO rules (#104524)
Inline profiling rules where the existing indirection was unneeded.
This commit is contained in:
parent
798bcaa1eb
commit
9084e1b04f
@ -643,7 +643,7 @@ profile-gen-stamp: profile-clean-stamp
|
|||||||
exit 1;\
|
exit 1;\
|
||||||
fi
|
fi
|
||||||
@echo "Building with support for profile generation:"
|
@echo "Building with support for profile generation:"
|
||||||
$(MAKE) build_all_generate_profile
|
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
# Run task with profile generation build to create profile information.
|
# Run task with profile generation build to create profile information.
|
||||||
@ -653,8 +653,9 @@ profile-run-stamp:
|
|||||||
# enabled.
|
# enabled.
|
||||||
$(MAKE) profile-gen-stamp
|
$(MAKE) profile-gen-stamp
|
||||||
# Next, run the profile task to generate the profile information.
|
# Next, run the profile task to generate the profile information.
|
||||||
$(MAKE) run_profile_task
|
@ # FIXME: can't run for a cross build
|
||||||
$(MAKE) build_all_merge_profile
|
$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
|
||||||
|
$(LLVM_PROF_MERGER)
|
||||||
# Remove profile generation binary since we are done with it.
|
# Remove profile generation binary since we are done with it.
|
||||||
$(MAKE) clean-retain-profile
|
$(MAKE) clean-retain-profile
|
||||||
# This is an expensive target to build and it does not have proper
|
# This is an expensive target to build and it does not have proper
|
||||||
@ -662,19 +663,6 @@ profile-run-stamp:
|
|||||||
# to record its completion and avoid re-running it.
|
# to record its completion and avoid re-running it.
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
.PHONY: build_all_generate_profile
|
|
||||||
build_all_generate_profile:
|
|
||||||
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
|
|
||||||
|
|
||||||
.PHONY: run_profile_task
|
|
||||||
run_profile_task:
|
|
||||||
@ # FIXME: can't run for a cross build
|
|
||||||
$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
|
|
||||||
|
|
||||||
.PHONY: build_all_merge_profile
|
|
||||||
build_all_merge_profile:
|
|
||||||
$(LLVM_PROF_MERGER)
|
|
||||||
|
|
||||||
# Compile Python binary with profile guided optimization.
|
# Compile Python binary with profile guided optimization.
|
||||||
# To force re-running of the profile task, remove the profile-run-stamp file.
|
# To force re-running of the profile task, remove the profile-run-stamp file.
|
||||||
.PHONY: profile-opt
|
.PHONY: profile-opt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user