FP /

LLVMBackendForTimber

LLVM backend for Timber

What is LLVM?

LLVM, the Low Level Virtual Machine, is a virtual instruction set, a collection of program transformations and optimisations and backends for many architectures.

What is Timber?

Timber is a pure, strict functional language with Haskell-like syntax and a object-oriented monadic layer. Timber is intended for programming embedded systems with some real-time constraints. Presently, a POSIX implementation is available; an ARM version, running on bare hardware, is soon forthcoming.

What is this project?

The Timber compiler compiles source code to C, which is then compiled by gcc (or some other C compiler). Before emitting C code, the compiler has transformed the program into an intermediate, imperative language. The aim of his project is to emit LLVM code instead of C and to investigate the use of various LLVM optimisations in the Timber context.

Outline of project activities:

  • Learn the Timber langage.
  • Learn the overall structure of the Timber compiler (it is written in Haskell).
  • Learn the LLVM instruction set and some example uses of LLVM (several tutorials can be found on the LLVM site).
  • Write a new Haskell module, emitting LLVM from the internal Kindle language.
  • Evaluate the result.
  • As time permits: experiment with different LLVM backend passes.

Prerequisites: Functional programming, Programming languages, Compiler construction

Contact: Björn von Sydow

Number of people: 1-2