forked from GiorgioZacharo/Trireme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_trireme_analysis.sh
executable file
·54 lines (43 loc) · 1.57 KB
/
run_trireme_analysis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
############### This is the System Aware AccelSeeker Analysis on the whole app ##############
#
#
# Georgios Zacharopoulos <[email protected]>
# Date: January, 2020
# Harvard University / Universita' della Svizzera italiana (USI Lugano)
###############################################################################################
#!/bin/bash
set -e
# Start Editing.
# LLVM build directory - Edit this line. HPVM_BUILD=path/to/llvm/build
HPVM_BUILD=/shared/workspace/yingj4/trireme-2023/hpvm-release/hpvm/build/
# BENCH NAME - Edit this line to use it to another benchmark/application.
#BENCH=h264
#BENCH=h264-func-mg
BENCH=main.hpvm.ll
#BENCH=audioDecoding-seq-profile.ll
# Maximum Level of Bottom-Up Analysis.
TOP_LEVEL=6
# Directory that contains the .ir files.
IRDIR= #src
# Stop Editing.
if [ ! -f "$BENCH" ]; then
echo "$BENCH needs to be generated."
exit 0;
else
echo "$BENCH exists - no need to generate it again."
fi
# Collects IO information, Indexes info and generates .gv call graph files for every function.
$HPVM_BUILD/bin/opt -load $HPVM_BUILD/lib/AccelSeekerIO.so -AccelSeekerIO -stats > /dev/null $BENCH
mkdir gvFiles; mv *.gv gvFiles/.
#exit 0;
# Collects SW, HW and AREA estimation bottom up.
for ((i=0; i <= $TOP_LEVEL ; i++)) ; do
echo "$i"
printf "$i" > level.txt
$HPVM_BUILD/bin/opt -load $HPVM_BUILD/lib/AccelSeeker.so -AccelSeeker -stats > /dev/null $BENCH
done
cp LA_$TOP_LEVEL.txt LA.txt; mkdir analysis_data; mv SW_*.txt HW_*.txt AREA_*.txt LA_*.txt analysis_data/.
rm level.txt
exit 0;
# Delete all files
rm *.txt; rm -r gvFiles