{"id":21498006,"url":"https://github.com/bd-g/isothermal-speculative-pre","last_synced_at":"2026-04-28T18:02:09.480Z","repository":{"id":64119690,"uuid":"565989109","full_name":"bd-g/isothermal-speculative-pre","owner":"bd-g","description":"Semester project for UMich EECS 583 Compilers course","archived":false,"fork":false,"pushed_at":"2022-12-14T19:13:32.000Z","size":209,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-08T15:48:21.751Z","etag":null,"topics":["ispre","llvm","pre"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bd-g.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-14T18:40:35.000Z","updated_at":"2023-01-10T17:38:33.000Z","dependencies_parsed_at":"2023-01-14T23:15:41.381Z","dependency_job_id":null,"html_url":"https://github.com/bd-g/isothermal-speculative-pre","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bd-g%2Fisothermal-speculative-pre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bd-g%2Fisothermal-speculative-pre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bd-g%2Fisothermal-speculative-pre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bd-g%2Fisothermal-speculative-pre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bd-g","download_url":"https://codeload.github.com/bd-g/isothermal-speculative-pre/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244035733,"owners_count":20387379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ispre","llvm","pre"],"created_at":"2024-11-23T16:33:35.679Z","updated_at":"2026-04-28T18:02:04.436Z","avatar_url":"https://github.com/bd-g.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Isothermal Speculative Partial Redundancy Elimination\n\nThis project partially fulfills the requirements for the EECS 583 Compilers course at the University of Michigan.\n\n## Requirements\n\n- LLVM Installation - see Step 1 in [Setup](#setup).\n- Packages required by `get_statistics.sh`\n    - tr\n    - sed\n\n## Setup\n\n1. [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.\n2. Inside the newly cloned git repo, create a build directory, generate the Makefile, and make the project.\n    ```\n    $ mkdir build \u0026\u0026 cd build\n    $ cmake ..\n    $ make\n    ```\n3. 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:\n    ```\n    $ ./get_statistics.sh -D ispre_test1\n    ```\n\n## Benchmarks\n\nThe `get_statistics.sh` performs two different benchmarks, correctness and performance, on four levels. The four levels are:\n\n    - O0 optimization \n    - O0 optimization plus global value numbering (LLVM's implementation of traditional PRE) and dead code elimination\n    - O0 optimization plus our custom ISPRE pass and dead code elimination\n    - O0 optimization plus multiple passes of our custom ISPRE pass and dead code elimination\n\nThe 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. \n\nThe performance benchmark will then run profiling on the four different levels, comparing runtime and IR code size between all four.\n\n## Results\n\nThe below results were obtained by running the benchmark script on an department server at the University of Michigan.\n\n```\n$ ./get_statistics.sh ispre_test1\n=== Correctness Check ===\n\u003e\u003e Does the custom pass maintain correct program behavior?\n\u003e\u003e PASS\n\n=== Performance Check ===\n1. \n   a. Runtime performance of unoptimized code\n\nreal    0m0.294s\nuser    0m0.294s\nsys     0m0.000s\n\n   b. Code size (IR) of unoptimized code\n\n      3480 bytes\n2. \n   a. Runtime performance of GVN code\n\nreal    0m0.347s\nuser    0m0.347s\nsys     0m0.000s\n\n   b. Code size (IR) of optimized code\n\n      3504 bytes, .006% change\n\n3. \n   a. Runtime performance of ISPRE code\n\nreal    0m0.268s\nuser    0m0.264s\nsys     0m0.004s\n\n   b. Code size (IR) of optimized code\n\n      3524 bytes, .012% change\n\n4. \n   a. Runtime performance of Multipass ISPRE code\n\nreal    0m0.268s\nuser    0m0.264s\nsys     0m0.004s\n\n   b. Code size (IR) of optimized code\n\n      3652 bytes, .049% change\n```\n\nbdgeorge@eecs583a:~/isothermal-speculative-pre/benchmarks$ \n\n## Bibliography\n\nThis project is inspired and informed by the following paper - a big thank you to the authors.\n\nHorspool, 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. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbd-g%2Fisothermal-speculative-pre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbd-g%2Fisothermal-speculative-pre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbd-g%2Fisothermal-speculative-pre/lists"}