-
Notifications
You must be signed in to change notification settings - Fork 436
Compiling CPU2000 2006 2017
Changwei Zou edited this page Mar 12, 2023
·
11 revisions
-
Put cpu2000-flto.cfg file into folder $CPU2000_HOME/config
-
Analyze CPU2000 to generate bc files
cd $CPU2000_HOME
. ./shrc
rm -rf benchspec/CINT2000/*/exe/
rm -rf benchspec/CFP2000/*/exe/
runspec --action=run --config=cpu2000-flto --tune=base --size=test --iterations=1 --noreportable all
- Collect bc files
cd $CPU2000_HOME
mkdir llvm-4.0.0.opt.bcs
find . -name *.opt.bc -exec cp {} llvm-4.0.0.opt.bcs/ \;
- Rename *.bc ==> *.orig
for f in *.opt.bc; do
mv "$f" "$(basename "$f" .opt.bc).orig"
done
- Print out command line to run a specific exe for a benchmark
cd benchspec/CINT2000/252.eon/run/00000001/
specinvoke -n
-
Put cpu2006-flto.cfg file into folder $CPU2006_HOME/config
-
Analyze CPU2006 to generate bc files
cd $CPU2000_HOME
. ./shrc
rm -rf benchspec/CPU2006/*/exe/
runspec --action=run --config=cpu2006-flto --tune=base --size=test --iterations=1 --noreportable all
-
Install WLLVM and make sure it works as expected
-
Put cpu2017-wllvm.cfg file into folder $CPU2017_HOME/config
-
Generate bc files for the 28 C/C++ programs (excluding the other 15 Fortran programs) in CPU2017.
There are 43 benchmarks in CPU2017.
cd $CPU2017_HOME
. ./shrc
runcpu --action=clean --config=cpu2017-wllvm all
rm -rf benchspec/CPU/*/exe/
rm -rf benchspec/CPU/*/build/
rm -rf benchspec/CPU/*/run/
runcpu --action=build --tune=base --config=cpu2017-wllvm 500 502 505 508 510 511 519 520 523 525 526 531 538 541 544 557 600 602 605 619 620 623 625 631 638 641 644 657
- Copy the generated executable files to a directory you specify.
cd /path/to/the/directory
mkdir -p exe
mkdir -p bc
mkdir -p ll
find $CPU2017_HOME/benchspec/CPU -name "*.mytest-*" -exec cp {} /path/to/the/directory/exe \;
- Reuse the following shell script to generate bc files .
Make sure your WLLVM is still working in your current shell terminal.
#!/bin/bash
exes=`ls ./exe`
for e in ${exes}
do
echo "extract-bc ./exe/${e} -o ./bc/${e}.bc 2>/dev/null"
extract-bc ./exe/${e} -o ./bc/${e}.bc 2>/dev/null
llvm-dis ./bc/${e}.bc -o ./ll/${e}.ll
done