Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bd-g/isothermal-speculative-pre
Semester project for UMich EECS 583 Compilers course
https://github.com/bd-g/isothermal-speculative-pre
ispre llvm pre
Last synced: 12 days ago
JSON representation
Semester project for UMich EECS 583 Compilers course
- Host: GitHub
- URL: https://github.com/bd-g/isothermal-speculative-pre
- Owner: bd-g
- License: agpl-3.0
- Created: 2022-11-14T18:40:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T19:13:32.000Z (about 2 years ago)
- Last Synced: 2025-01-22T21:14:32.493Z (13 days ago)
- Topics: ispre, llvm, pre
- Language: C++
- Homepage:
- Size: 204 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Isothermal Speculative Partial Redundancy Elimination
This project partially fulfills the requirements for the EECS 583 Compilers course at the University of Michigan.
## Requirements
- LLVM Installation - see Step 1 in [Setup](#setup).
- Packages required by `get_statistics.sh`
- tr
- sed## Setup
1. [Install LLVM](https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm) on your machine. Then, clone this repository to your machine.
2. Inside the newly cloned git repo, create a build directory, generate the Makefile, and make the project.
```
$ mkdir build && cd build
$ cmake ..
$ make
```
3. Navigate to the `benchmarks` folder, and use the `get_statistics.sh` script to do profiling on any C file placed in the same folder. You can view documentation for the script by running `./get_statistics.sh -h`. Example:
```
$ ./get_statistics.sh -D ispre_test1
```## Benchmarks
The `get_statistics.sh` performs two different benchmarks, correctness and performance, on four levels. The four levels are:
- O0 optimization
- O0 optimization plus global value numbering (LLVM's implementation of traditional PRE) and dead code elimination
- O0 optimization plus our custom ISPRE pass and dead code elimination
- O0 optimization plus multiple passes of our custom ISPRE pass and dead code eliminationThe correctness benchmark will verify correct behavior of the custom pass by comparing the output of a compiled executable with our pass and the output of a compiled executable without our pass.
The performance benchmark will then run profiling on the four different levels, comparing runtime and IR code size between all four.
## Results
The below results were obtained by running the benchmark script on an department server at the University of Michigan.
```
$ ./get_statistics.sh ispre_test1
=== Correctness Check ===
>> Does the custom pass maintain correct program behavior?
>> PASS=== Performance Check ===
1.
a. Runtime performance of unoptimized codereal 0m0.294s
user 0m0.294s
sys 0m0.000sb. Code size (IR) of unoptimized code
3480 bytes
2.
a. Runtime performance of GVN codereal 0m0.347s
user 0m0.347s
sys 0m0.000sb. Code size (IR) of optimized code
3504 bytes, .006% change
3.
a. Runtime performance of ISPRE codereal 0m0.268s
user 0m0.264s
sys 0m0.004sb. Code size (IR) of optimized code
3524 bytes, .012% change
4.
a. Runtime performance of Multipass ISPRE codereal 0m0.268s
user 0m0.264s
sys 0m0.004sb. Code size (IR) of optimized code
3652 bytes, .049% change
```bdgeorge@eecs583a:~/isothermal-speculative-pre/benchmarks$
## Bibliography
This project is inspired and informed by the following paper - a big thank you to the authors.
Horspool, R.N., Pereira, D.J. and Scholz, B. (2006) “Fast profile-based partial redundancy elimination,” Lecture Notes in Computer Science, pp. 362–376. Available at: https://doi.org/10.1007/11860990_22.