A compiler-style optimization tool for C programs that performs static analysis and applies optimization techniques to improve code efficiency.
- Control Flow Graph (CFG) construction
- Dead Code Elimination (DCE)
- Constant Folding
- CFG visualization
- Code simplification and optimization
Compilers optimize code to improve performance and reduce unnecessary computations. This project explores core compiler techniques and demonstrates how code can be transformed for efficiency.
- Language: Python / C++
- Graph Visualization: Graphviz / custom rendering
Evaluates constant expressions at compile time.
Removes code that does not affect program output.
Represents program structure for analysis and transformations.
- Parse input C code
- Generate intermediate representation (IR)
- Build CFG
- Apply optimization passes
- Output optimized code