[LLVMdev] Adding support to LLVM for data & code layout (needed by GHC)

Sebastian Redl sebastian.redl at getdesigned.at
Tue Jun 8 07:50:46 PDT 2010


On Tue, 8 Jun 2010 11:42:41 +0100, David Terei <davidterei at gmail.com>
wrote:
> Hi All,
> 
> The GHC developers would like to add support to llvm to enable the
> order that code and data are laid out in, in the resulting assembly
> code produced by llvm to be defined by the user. The reason we would
> like to have this feature is explained in the blog post on GHC's use
> of llvm here:
> http://blog.llvm.org/2010/05/glasgow-haskell-compiler-and-llvm.html,
> specifically under the title, 'Problems with backend'.
> 

Whichever way is chosen, the ability to reorder and intermingle functions
and data arbitrarily is interesting to more than just GHC. In particular, I
would like to point out the efforts by Mozilla to make Firefox startup
faster, which essentially came down to reordering stuff in the executables
so that everything is ordered by the sequence of accesses during program
startup. This means that programs can be read sequentially from the front
to the end, thus reducing I/O latency.

Tools for automating this process would probably benefit from being able
to specify the layout this way.

Sebastian




More information about the llvm-dev mailing list