[Haskell-cafe] Runtime strictness analysis for polymorphic HOFs?

Max Bolingbroke batterseapower at hotmail.com
Thu Jun 18 12:30:53 EDT 2009

2009/6/18 Edward Kmett <ekmett at gmail.com>:
> What is interesting is in a lazy setting, if you are tracing a bytecode
> representation that knows about allocation and thunks, you can do some
> additional optimizations in here. If on every path to a side exit or the end
> of the loop you find that the thunk is evaluated you can evaluate it
> strictly and move its execution earlier in the trace. This gives you a weak
> form of runtime strictness analysis. If the pointer to that thunk never
> escapes, then you can unbox the contents of the thunk and operate on its
> members in registers. Add constant folding, polyinline caching to improve
> branch prediction for spineless tagless g-machine thunk evaluation, and code
> migration to the side exits and it becomes an interesting runtime system.

This sounds absolutely awesome! Is the source code for your prototype
publicly available anywhere? I'd love to take a look at the basic
structure of something like this - trace JITing is something I keep
meaning to look at in more depth.


More information about the Haskell-Cafe mailing list