https://github.com/shivansh/branchcorrelations
Branch prediction using branch correlations. Made as part of the course Data-driven Program Analysis (CS686)
https://github.com/shivansh/branchcorrelations
branch-correlations branch-predictor
Last synced: 4 months ago
JSON representation
Branch prediction using branch correlations. Made as part of the course Data-driven Program Analysis (CS686)
- Host: GitHub
- URL: https://github.com/shivansh/branchcorrelations
- Owner: shivansh
- Created: 2017-09-07T14:24:51.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-01T02:25:23.000Z (about 7 years ago)
- Last Synced: 2025-01-07T16:27:20.564Z (5 months ago)
- Topics: branch-correlations, branch-predictor
- Language: C++
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [CS686A] Evaluating branch correlations
Done as a part of the course - [Data driven program analysis](http://web.cse.iitk.ac.in/users/cs686/).
The aim of this assignment is to evaluate correlations between *all the branches* in a given C program. A strong correlation between two branches `(b1, b2)` is directly proportional to the probablity of both the branches behaving similarly.### [Project Report](report.pdf)
Done in collaboration by -
* Jaivardhan Kapoor (150300)
* Shivansh Rai (14658)## Dependencies
The following package is required for generating the CSV file -
* `csvtool` : The use of this package has been done to take transposition of the generated CSV file.For running the R file, the following packages are required -
* `littler`
* `r-cran-plyr`## Instructions
The shared library path needs to be appropriately updated -
```
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$rose_dir/lib
```
**NOTE 1:** `$rose_dir` should be updated with path to the local Rose installation directory.
**NOTE 2:** Intances of `~/rose_install` in [Makefile](Makefile) needs to be updated with path to the local Rose installation directory.For generating the CSV file, execute -
```
make # Compilation step
make run # Generates the CSV file
```
This will generate the file `output.csv`.To produce the correlation matrix between branches, execute -
```
make generate_correlations
```
A sample of the generated output is available at [correlations_demo.txt](correlations_demo.txt).The testcase files are placed inside the directory [testcases](testcases). In case adding new testcase files for instrumentation, their names in the [Makefile](Makefile) have to be updated appropriately (in the last line).