Skip to content

Commit 33bdf9b

Browse files
committed
Define BENCH_FAST
If BENCH_FAST env var is set, run benchmarking once instead of 5 times and use smaller target (not instead of clang).
1 parent 42d825f commit 33bdf9b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

driver.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/bash
2-
BENCH_RUNS=5
3-
USE_PERF=1
2+
if [ -n $BENCH_FAST ]; then
3+
BENCH_RUNS=1
4+
BENCH_TARGET=not
5+
else
6+
BENCH_RUNS=5
7+
BENCH_TARGET=clang
8+
fi
49

510
SCRIPT_DIR=$(dirname `realpath "$0"`)
611
LLVM_SRC=${LLVM_SOURCE:-https://github.com/llvm/llvm-project}
@@ -87,7 +92,7 @@ bench () {
8792
perf stat -r$BENCH_RUNS -o $b$log.txt \
8893
-e instructions,cycles,L1-icache-misses,iTLB-misses \
8994
--pre "ninja -C $RUNDIR clean" -- \
90-
ninja -C $RUNDIR clang
95+
ninja -C $RUNDIR $BENCH_TARGET
9196
done
9297
}
9398

0 commit comments

Comments
 (0)