[Haskell-cafe] Optimizing Compiler for the ICFP 09 contest's VM
matthias.goergens at googlemail.com
Sat Jul 4 17:09:24 EDT 2009
The byte code for the virtual machine of this years ICFP specified a
language with single assignment per simulation step. Interestingly
most memory locations get overwritten each simulation step before they
are read. That means, those locations don't have to be remember
between steps. Also locations that never get overwritten (e.g.
location associated with Noops), are constant. Thus the variables
state of the simulation is orders of magnitude smaller than the naive
2^16 * 32 bit + 1 bit.
I wrote a small program that analyses the dataflow of a byte code
program (and initial memory setup) for the VM. After analyzing my
program emits Haskell code to run the given byte code.
If anyboby is interested, I can document my program and put it online
somewhere. I also made pretty graphs of the dataflow with graphviz.
More information about the Haskell-Cafe