Compiling Haskell to LLVM (Thesis Defense)
John van Schie

Abstract:

Most modern compilers generate executables by targeting high level languages (C, Java, etc.) or managed virtual environments such as the JVM. In this thesis we explore an alternate approach: generating executables by targeting a typed assembly language. Typed assembly languages are low level, machine centric, languages that abstract away from platform specifics. They provide type safety in a language neutral way and they make no assumptions regarding the runtime environment's memory model, security guarantees etc.. The LLVM is a mature optimizing compiler framework that provides a typed assembly language.

In this talk, we will present the design and implementation of a backend for EHC that targets the LLVM. We will follow a small Haskell program as it passes through different stages of the EHC compiler, paying special attention to the code semantics and performance. Finally, we contrast the performance of executables produced by the LLVM and C backends of EHC and draw some conclusions regarding the efficiency of LLVM as a backend target for Haskell compilers.

Published:

"Compiling Haskell To LLVM", John van Schie,
Thesis Defense, Utrecht University, Netherlands, June 2008.

Download Presentation: