From baa131810b32c4a04b13dca667d73f5359a4d6a3 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Tue, 23 May 2023 00:24:52 +0900 Subject: [PATCH 1/4] gh-101282: Revert some M4 style for BOLT configuration --- configure | 4 +--- configure.ac | 21 +-------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 2b863be108be26..60a2404fdf3c2c 100755 --- a/configure +++ b/configure @@ -8398,9 +8398,7 @@ $as_echo "$BOLT_INSTRUMENT_FLAGS" >&6; } $as_echo_n "checking BOLT_APPLY_FLAGS... " >&6; } if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS=-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -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="-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -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" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5 $as_echo "$BOLT_APPLY_FLAGS" >&6; } diff --git a/configure.ac b/configure.ac index 786d3414eb0e06..4cfb7d4aeabfed 100644 --- a/configure.ac +++ b/configure.ac @@ -2085,26 +2085,7 @@ AC_ARG_VAR( AC_MSG_CHECKING([BOLT_APPLY_FLAGS]) if test -z "${BOLT_APPLY_FLAGS}" then - AS_VAR_SET( - [BOLT_APPLY_FLAGS], - [m4_join([ ], - [-update-debug-sections], - [-reorder-blocks=ext-tsp], - [-reorder-functions=hfsort+], - [-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="-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -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" fi AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) From 554a434a2df1a014f94ca3880bc1c285a85d0131 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Tue, 23 May 2023 01:11:24 +0900 Subject: [PATCH 2/4] Apply Ned's suggestion --- configure | 16 +++++++++++++++- configure.ac | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 60a2404fdf3c2c..eadfb90e2fd122 100755 --- a/configure +++ b/configure @@ -8398,7 +8398,21 @@ $as_echo "$BOLT_INSTRUMENT_FLAGS" >&6; } $as_echo_n "checking BOLT_APPLY_FLAGS... " >&6; } if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS="-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -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="-update-debug-sections\ + -reorder-blocks=ext-tsp\ + -reorder-functions=hfsort+\ + -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" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5 $as_echo "$BOLT_APPLY_FLAGS" >&6; } diff --git a/configure.ac b/configure.ac index 4cfb7d4aeabfed..d20662672ba39c 100644 --- a/configure.ac +++ b/configure.ac @@ -2085,7 +2085,21 @@ AC_ARG_VAR( AC_MSG_CHECKING([BOLT_APPLY_FLAGS]) if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS="-update-debug-sections -reorder-blocks=ext-tsp -reorder-functions=hfsort+ -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="-update-debug-sections\ + -reorder-blocks=ext-tsp\ + -reorder-functions=hfsort+\ + -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" fi AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) From b2abdb33c7f392846b5720b473c6335c67a1fb55 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 24 May 2023 16:06:24 +0900 Subject: [PATCH 3/4] Update configure.ac Co-authored-by: Erlend E. Aasland --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d20662672ba39c..e82a76c8186cb1 100644 --- a/configure.ac +++ b/configure.ac @@ -2085,7 +2085,8 @@ AC_ARG_VAR( AC_MSG_CHECKING([BOLT_APPLY_FLAGS]) if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS="-update-debug-sections\ + BOLT_APPLY_FLAGS="\ + -update-debug-sections\ -reorder-blocks=ext-tsp\ -reorder-functions=hfsort+\ -split-functions\ @@ -2099,7 +2100,8 @@ then -indirect-call-promotion=all\ -dyno-stats\ -use-gnu-stack\ - -frame-opt=hot" + -frame-opt=hot\ +" fi AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) From a5812a3ac7926f3a2c910c0da5e594b93c7aecc5 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 24 May 2023 16:07:14 +0900 Subject: [PATCH 4/4] regen --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index eadfb90e2fd122..d79a97180391d8 100755 --- a/configure +++ b/configure @@ -8398,7 +8398,8 @@ $as_echo "$BOLT_INSTRUMENT_FLAGS" >&6; } $as_echo_n "checking BOLT_APPLY_FLAGS... " >&6; } if test -z "${BOLT_APPLY_FLAGS}" then - BOLT_APPLY_FLAGS="-update-debug-sections\ + BOLT_APPLY_FLAGS="\ + -update-debug-sections\ -reorder-blocks=ext-tsp\ -reorder-functions=hfsort+\ -split-functions\ @@ -8412,7 +8413,8 @@ then -indirect-call-promotion=all\ -dyno-stats\ -use-gnu-stack\ - -frame-opt=hot" + -frame-opt=hot\ +" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5 $as_echo "$BOLT_APPLY_FLAGS" >&6; }