https://github.com/auyxs/llvm-optimizations
UNIMORE Compilers Course 2024/25 - collection of assignments
https://github.com/auyxs/llvm-optimizations
compilers llvm llvm-ir
Last synced: 12 months ago
JSON representation
UNIMORE Compilers Course 2024/25 - collection of assignments
- Host: GitHub
- URL: https://github.com/auyxs/llvm-optimizations
- Owner: Auyxs
- License: mit
- Created: 2025-03-24T22:25:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-26T23:57:30.000Z (12 months ago)
- Last Synced: 2025-03-27T00:29:19.254Z (12 months ago)
- Topics: compilers, llvm, llvm-ir
- Language: C++
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LLVM Optimization Passes
[](https://llvm.org/)

Repository containing Compilers Course assignments at **Unimore** (2024/2025) - Implementation of LLVM IR optimization passes as plugins.
## First Assignment
### 1. Algebraic Identity
- `x + 0` → `x`
- `1 × 𝑥` → `x`
- `x - 0` → `x`
- `x / 1` → `x`
### 2. Strength Reduction
- `15 × 𝑥 = 𝑥 × 15` → `(𝑥 ≪ 4) – x`
- `y = x / 8` → `y = x >> 3`
### 3. Multi-Instruction Optimization
- `𝑎 = 𝑏 + 1, 𝑐 = 𝑎 − 1` → `𝑎 = 𝑏 + 1, 𝑐 = b`
## Usage
### Build
```bash
```
### Test
```bash
```
## Contributors
- Aurora Lin
- Eleonora Muzzi