Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandromaglione/range-analysis-llvm
Integer Range Analysis pass implemented for LLVM (High Performance Processors and Systems | UIC 569, Course Project 2020).
https://github.com/sandromaglione/range-analysis-llvm
analysis c compiler llvm llvm-clang llvm-ir llvm-pass optimization
Last synced: 20 days ago
JSON representation
Integer Range Analysis pass implemented for LLVM (High Performance Processors and Systems | UIC 569, Course Project 2020).
- Host: GitHub
- URL: https://github.com/sandromaglione/range-analysis-llvm
- Owner: SandroMaglione
- Created: 2020-05-17T17:24:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T05:38:02.000Z (over 4 years ago)
- Last Synced: 2024-11-15T09:46:38.758Z (3 months ago)
- Topics: analysis, c, compiler, llvm, llvm-clang, llvm-ir, llvm-pass, optimization
- Language: C++
- Homepage:
- Size: 11.4 MB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Integer Range Analysis in LLVM
This repository contains the code for the **Integer Range Analysis** passes written for LLVM.
The project contains two passes: **ConstantRange.cpp** and **BranchRange.cpp**.## Installation
The following instructions explain how to install and build the pass inside LLVM:
- Create file `example.c` (source code to analize) inside **~/Public/project/code**
- Open directory **~/Public/project/llvm-project/llvm/lib/Transforms**
- Create directory **ConstantRange**
- Update `CMakeLists.txt` inside **~/Public/project/llvm-project/llvm/lib/Transforms** by adding the newly created directory:
```
...
add_subdirectory(ConstantRange)
```
- Open `ConstantRange` folder
- Upload `ConstantRange.cpp` file
- Create `CMakeLists.txt` file
- Add make code to `CMakeLists.txt`:
```cpp
add_llvm_loadable_module( LLVMConstantRange
ConstantRange.cppPLUGIN_TOOL
opt
)
```
- Open directory **~/Public/project/llvm-project/build**
- Run command `make -j4` to build the pass## Benchmarks
The benchmarks sources are taken from the following repositories:
- https://github.com/TheAlgorithms/C
- https://github.com/xtaci/algorithms
- https://github.com/AllAlgorithms/c## Info
The passes have been tested on some example files. The code is not guaranteed to function in all cases. The passes can be expanded to encompass more code statements. See `src/branch-range/example` and `src/constant-range/example` to view the test cases and their results.## License
Created by **Maglione Sandro**, MIT license