WARIR: A WebAssembly Optimizing Compiler

A complete compiler pipeline from the SMPL teaching language down to WebAssembly, written for a graduate compilers course.

The back end is where most of the work went:

  • Graph-coloring register allocation, building the interference graph from live ranges and spilling when the graph is not colorable with the available registers.
  • SSA-based dataflow analysis driving common subexpression elimination and copy propagation, with the optimizations expressed as transformations on the SSA form rather than ad-hoc peephole rules.

Built with Python, Node.js, and WebAssembly.

Mahbub H. Raton
Mahbub H. Raton
PhD Student in Computer Science

I work on compilers and computer architecture — making programs survive the hardware they run on.

Related