i.MX515 Project
GHC ARM registerised port

in category Applications & Software
proposed by kgardas on 6th June 2011
Project Proposal
GHC[1] is state of the art Haskell compiler. It compiles into platform binary which is then run directly on the target hardware. GHC supports two kinds of builds: (1) registerised, this is the build where some of the internal GHC runtime most used references are kept in machine registers and so application compiled using this build are faster then (2) unregisterised, this is the build where GHC runtime references to internal structures are kept in main memory. Thanks to it, this build and application compiled by this are slower than in case of (1).
GHC also supports two kind of code generator backends: (1) NCG, so called native code generator, this generator generates directly target platform assembly which is then processed by GNU assembler and (2) LLVM generator, this is the generator which generates LLVM intermediate code which is then compiled into target platform assembly by the LLVM project infrastructure.
So far on ARM architecture, GHC just supports unregisterised build[2]. The scope of this project will be to change that situation and make GHC support registerised build. For this I'd like to choose more simpler way and this is to use already provided LLVM code generator backend. What will be needed is to come with proper mapping of GHC internal structures references to ARM registers. Also there will be a need to write ARM specific bits in the GHC runtime system and finally to hack LLVM to support GHC custom calling convention on ARM platform. This last point was already done for x86/x64 and was accepted by mainline so there is also hope (and in fact big chance) that ARM changes will be accepted too.
Thanks for considering,
Karel
[1]: http://www.haskell.org/ghc/
[2]: http://hackage.haskell.org/trac/ghc/wiki/Platforms

Project Blog Entries

No blog entries for this project
Genesi Network: Genesi - Main Site Power2People PowerDeveloper