Personal tools


From HaskellWiki

Jump to: navigation, search

Prototyping GHC Optimizations with HERMIT

Andrew Farmer and Andy Gill

HERMIT is a GHC plugin that allows the programmer to interact directly with the intermediate Core representation of their program *during* compilation. In this talk, we will provide an update on HERMIT's status, describe how HERMIT is being used in the wild, and discuss lessons learned about working with GHC's plugin mechanism.

We will discuss newly added capabilities from the point of view of our principal use-case - someone seeking to rapidly prototype new optimization passes in GHC.

HERMIT is being used to optimize SYB traversals, to fuse Stream Fusion's concatMap combinator, and to implement staged compilation within GHC to generate hardware from Haskell programs. We will briefly summarize each of these efforts, and how HERMIT supported each.

The Haskell Implementers Workshop in 2010 called for a tool to interact with Core, and explore optimization ideas. The goal of this talk is to share our experience of developing this sizable GHC plugin with GHC developers and to seek feedback and potential applications from the community.