Projects

Systems · 2025

Mini Java Compiler

A compiler pipeline that takes a small Java-like language from source code through parsing and intermediate representation to register allocation and instruction scheduling.

Java · compilers

How it works

The frontend includes scanning and recursive-descent parsing before lowering into an intermediate representation.

From there, I implemented SSA construction with φ-functions and dominance analysis, graph-coloring register allocation to reduce spills, and a dependence-graph instruction scheduler.

Outcome

On a roughly 128,000-instruction workload, the scheduler ran in about 1.7 seconds, stayed within 10% of an optimized baseline’s cycle count, and increased runtime by less than 2× when the input size doubled.

Related