The Glasgow Haskell Compiler (GHC) http://haskell.org/ghc is a widely used, industrial strength compiler for the broad-spectrum functional programming language Haskell. The compiler is available for all major operating systems and processors architectures.
GHC essentially has two backends. It either compiles Haskell code to C and uses gcc (the GNU C compiler) for final code generation, or it generates code natively for x86 and SPARC. Unfortunately, both backends have severe disadvantages. Compiling via C is very slow (due to the added runtime of the C compiler) and fragile (new versions of gcc often require changes to GHC). Native code generation is fast, but it requires a lot of effort to implement, maintain, and improve high quality code generators for multiple architectures.
In the project, we will explore a third alternative, namely the use of LLVM (Low Level Virtual Machine) http://llvm.org/, which is a portable code generation library and optimisation framework. The use of LLVM in GHC would obviate the need to run an external C compiler for code generation, while avoiding the development overhead of implementing and maintaining GHC-specific code generators.
This is not only an interesting and challenging compiler project using cutting-edge technology, but one whose outcomes would be widely used by the quickly growing Haskell community http://haskell.org/haskellwiki/Haskell_in_industry. |