Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd66e38

Browse filesBrowse files
committed
gh-104523: inline minimal PGO rules
Various rules were only ever invoked once and had minimal bodies. I don't see a benefit to the indirection. So this commit inlines rules to simplify the PGO logic. skip news (trivial, non-user-visible change)
1 parent 456d566 commit dd66e38
Copy full SHA for dd66e38

File tree

1 file changed

+4
-16
lines changed
Filter options

1 file changed

+4
-16
lines changed

‎Makefile.pre.in

Copy file name to clipboardExpand all lines: Makefile.pre.in
+4-16Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ profile-gen-stamp: profile-clean-stamp
642642
exit 1;\
643643
fi
644644
@echo "Building with support for profile generation:"
645-
$(MAKE) build_all_generate_profile
645+
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
646646
touch $@
647647

648648
# Run task with profile generation build to create profile information.
@@ -652,28 +652,16 @@ profile-run-stamp:
652652
# enabled.
653653
$(MAKE) profile-gen-stamp
654654
# Next, run the profile task to generate the profile information.
655-
$(MAKE) run_profile_task
656-
$(MAKE) build_all_merge_profile
655+
@ # FIXME: can't run for a cross build
656+
$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
657+
$(LLVM_PROF_MERGER)
657658
# Remove profile generation binary since we are done with it.
658659
$(MAKE) clean-retain-profile
659660
# This is an expensive target to build and it does not have proper
660661
# makefile dependency information. So, we create a "stamp" file
661662
# to record its completion and avoid re-running it.
662663
touch $@
663664

664-
.PHONY: build_all_generate_profile
665-
build_all_generate_profile:
666-
$(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS_NODIST="$(LDFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
667-
668-
.PHONY: run_profile_task
669-
run_profile_task:
670-
@ # FIXME: can't run for a cross build
671-
$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
672-
673-
.PHONY: build_all_merge_profile
674-
build_all_merge_profile:
675-
$(LLVM_PROF_MERGER)
676-
677665
# Compile Python binary with profile guided optimization.
678666
# To force re-running of the profile task, remove the profile-run-stamp file.
679667
.PHONY: profile-opt

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.