Steps to Run the Experiments
Preparation
- Make sure LLVM 9.0.1 (remove-bc branch) is installed and confirm by
opt --version
- Run
./compile_all.sh
to compile all LLVM passes - Make sure rustc is installed
- Change the hardcoded
rlib_path
ingenExp.sh
Run Benchmarks
- Run
./all_exp.sh
, it will run all the experiments and create results underbenchmarks/results
(might take several hours)
Run Brotli
- Create file
silesia-5.brotli
following steps in brotli-exp/README.md - Run
./run_brotli_exp.sh
(might take around 1 hour)
Create Figures
- Use
python3 ResultPresenter.py -p results/
to view results on the webpage interactively. - Run
python3 ResultPresenter.py -p results/ -g
to generate pdf files underimages
. Might overwrite existing files.
File Structure
-
./benchmarks: benchmarks evaluated with explorer
-
./brotli-exp: brotli-decompressor experiment
-
./outer-loop-prof-instr: instrumentation of outer-loop profile
-
./outer-loop-prof-runtime: runtime for outer-loop profile
-
./avoid-bench-inline: a way to modify LLVM IR to avoid inlining of function
bench
(not stable) -
./remove-bc-pass: remove bounds checks at the LLVM IR level
-
./show-fn-names: show functions with bounds checks (including
slice_index_order/len_fail
in it) -
./images: plots of experiments included in the paper
-
*.sh: bash scripts for running the experiments
-
GreedyRemove.py: main driver for the exploration
-
ResultPresenter.py: automatically create all plots
Notes
- Need to turn off inlining by adding
#[inline(never)]
to the called library function, otherwise LTO will inline the called library function and do huge optimizations
Benchmarks
- assume_true | 0.1.0 | unknown_size_bench
- outils | 0.2.0 | aatree_big_random_insert_delete
- itertools | 0.9.0 | permutations_iter
- nibble-vec | 0.1.0 | nib_get_on_vec_of_9_elements (need to drop!)
- hex | 0.4.2 | faster_hex_encode_fallback
- fancy-regex | 0.4.1 | run_backtrack_limit
- phf-generator | 0.8.0 | gen_hash_small (param: 10)
- geo | 0.16.0 | frechet_distance_f32
- jpeg-decoder | 0.1.20 | decode_a_512x512_JPEG
- crc-any | 2.3.5 | crc32_update_megabytes