Skip to content

Commit

Permalink
Add CSSPGO configuration
Browse files Browse the repository at this point in the history
Can be used with llvm/llvm-project#79942
  • Loading branch information
aaupov committed Sep 26, 2024
1 parent 7f612f5 commit 9f2b46f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ PGO_ARGS="${BASE_PGO_ARGS} -C ${LCCC}PGO.cmake"
BASE_LTO_PGO_ARGS="-DPGO_INSTRUMENT_LTO=Thin"
# LTO+PGO: Two-stage + LTO + PGO
LTO_PGO_ARGS="$BASE_LTO_PGO_ARGS $PGO_ARGS"
# CSSPGO: Two-stage + CSSPGO build, trained on LLVM
CSSPGO_ARGS="-DBOOTSTRAP_BOOTSTRAP_CLANG_PGO_TRAINING_DATA_SOURCE_DIR=${LL}
${BASE_PGO_ARGS} -C ${LCCC}CSSPGO.cmake"
# LTO+CSSPGO
LTO_CSSPGO_ARGS="$BASE_LTO_PGO_ARGS $CSSPGO_ARGS"

BOLT_PASSTHRU_ARGS="-DCLANG_BOOTSTRAP_CMAKE_ARGS=-C../../../../${LCCC}BOLT.cmake
-DCLANG_BOOTSTRAP_TARGETS=clang-bolt"
Expand All @@ -49,9 +54,15 @@ BOLT_BASELINE_ARGS="$BASELINE_ARGS $BOLT_PASSTHRU_ARGS"
BOLT_LTO_ARGS="$LTO_ARGS $BOLT_PASSTHRU_ARGS"
BOLT_PGO_ARGS="$COMMON_CMAKE_ARGS -C ${LCCC}BOLT-PGO.cmake"
BOLT_LTO_PGO_ARGS="$BASE_LTO_PGO_ARGS $BOLT_PGO_ARGS"
BOLT_CSSPGO_ARGS="$COMMON_CMAKE_ARGS
-DBOOTSTRAP_CLANG_PGO_TRAINING_DATA_SOURCE_DIR=$PWD/${LL}
-C ${LCCC}BOLT-CSSPGO.cmake"
BOLT_LTO_CSSPGO_ARGS="$BASE_LTO_PGO_ARGS $BOLT_CSSPGO_ARGS"

CONFIGS=( BASELINE LTO PGO LTO_PGO CSSPGO LTO_CSSPGO )

build () {
for cfg in BASELINE LTO PGO LTO_PGO
for cfg in ${CONFIGS[*]}
do
bcfg=BOLT_$cfg
echo $bcfg
Expand Down Expand Up @@ -101,7 +112,7 @@ run () {
RUNDIR=`mktemp -d`
sudo mount -t tmpfs -o size=10g none $RUNDIR

for cfg in BASELINE LTO PGO LTO_PGO
for cfg in ${CONFIGS[*]}
do
echo $1
bench $cfg $1 $RUNDIR
Expand Down

0 comments on commit 9f2b46f

Please sign in to comment.