Ticket #1582 (new proposed-project)
LLVM optimisation passes / tables next to code
| Reported by: | batterseapower | Owned by: | |
|---|---|---|---|
| Priority: | good | Keywords: | |
| Cc: | Topic: | GHC | |
| Difficulty: | 1 person Summer | Mentor: | not-accepted |
Description
Project 1: LLVM optimisation passes ~
1) Clearly identify issues with LLVM produced assembly code in the context of GHC
- This can be done by examining how it compares to the native code generator on nofib benchmarks
- You might be able to get some mileage from simply eyeballing the assembly and looking for "obvious" stupidity, like the ESP issue David spotted
- The result of this part should be a simple set of Haskell test cases, the assembly they produced, what the assembly *should* be (roughly) and perhaps some notes on what might fix it
2) The second part would be to identify the lowest hanging fruit from those things identified in 1) and make changes to the LLVM output / write LLVM optimisations (apparently this is a joy to do, the LLVM framework is very well designed) to fix the issues
Separating the project into two parts like this means that we could get something out of the project even if the student is unable to make significant progress with LLVM itself in the GSoC timeframe. Having a clear description of the problems involved + simple benchmark programs would be a huge help to someone attempting part 2) in the future, or they could serve as the basis for feature requests to the LLVM developers.
Project 2: Tables next to code
My feeling is that this is the more challenging of the two projects, as it is likely to touch more of LLVM / GHC. However, it is likely to yield a solid 6% speedup. It seems there are two implementation options:
1) Postprocessor ala the Evil Mangler (a nice self contained project, but not the best long term solution)
2) Modify LLVM to support this feature
Other
Either project could include looking at the impact of using llvm for link time optimisation, and a particularly able student might be able to attempt both halves.
See also the thread at http://www.haskell.org/pipermail/cvs-ghc/2010-February/052606.html and David's thesis http://docs.google.com/viewer?url=http%3A%2F%2Fwww.cse.unsw.edu.au%2F~pls%2Fthesis%2Fdavidt-thesis.pdf
