It demonstrates how modern compiler optimizations can be applied step by step on an intermediate representation (Three-Address Code).
The project is split into three phases (modules), each implemented as an independent component but designed to work together as a pipeline:
- three-address β Converts Java source into Three-Address Code (TACo), an intermediate representation commonly used in compilers.
- conditional-constant-propagation β Performs Conditional Constant Propagation (CCP) to evaluate expressions at compile-time and remove dead code.
- inlining β Applies Function Inlining to replace method calls with their body, reducing function call overhead and enabling further optimizations.
- Each optimization pass can be run independently or as part of the pipeline
- Preserves individual repository history via
git subtree - Built with Java 17 and standard compiler design techniques
- Java 17
- Compiler theory (Intermediate Representations, Data-flow Analysis, Optimization passes)
flowchart LR
A[Java Source Code] --> B[Three-Address Code]
B --> C[Conditional Constant Propagation]
C --> D[Function Inlining]
D --> E[Optimized Code]