From a87802421a2b472728e958d8d2aa54f19cea67eb Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 14 Jan 2025 17:36:04 -0600 Subject: [PATCH 1/2] Enable `-split-all-cold` for BOLT --- configure | 2 +- configure.ac | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 70581e11b60682..17178c5809a010 100755 --- a/configure +++ b/configure @@ -9429,7 +9429,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; } printf %s "checking BOLT_APPLY_FLAGS... " >&6; } if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot " + BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions -split-all-cold -icf=1 -inline-all -split-eh -reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive -inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack -frame-opt=hot " fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5 diff --git a/configure.ac b/configure.ac index d7c3920d049d67..c49b6501bd0192 100644 --- a/configure.ac +++ b/configure.ac @@ -2218,6 +2218,7 @@ then -reorder-blocks=ext-tsp -reorder-functions=cdsort -split-functions + -split-all-cold -icf=1 -inline-all -split-eh From 0c7711c60c575c0b70e97e50dec9222590db8ca9 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 14 Jan 2025 17:39:25 -0600 Subject: [PATCH 2/2] NEWS --- .../next/Build/2025-01-14-17-38-47.gh-issue-128514.K50gQv.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2025-01-14-17-38-47.gh-issue-128514.K50gQv.rst diff --git a/Misc/NEWS.d/next/Build/2025-01-14-17-38-47.gh-issue-128514.K50gQv.rst b/Misc/NEWS.d/next/Build/2025-01-14-17-38-47.gh-issue-128514.K50gQv.rst new file mode 100644 index 00000000000000..0ffb87dd557c77 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-01-14-17-38-47.gh-issue-128514.K50gQv.rst @@ -0,0 +1,2 @@ +Enable ``-split-all-cold`` during BOLT optmizations which outlines as many +cold basic blocks as possible.