|Version 1 (modified by dterei, 3 years ago) (diff)|
The LLVM backend sadly includes a 'mangler'. This is a Haskell written program (well pass of GHC) that runs on the assembly code generated by the LLVM compiler. We do this as there are a few issues with communicating to LLVM exactly what we want generated as object code and so, for now, it is easiest to post-process the assembly.
Long term we ideally would submit patches to LLVM and get rid of the mangler. The work required to do that may be quite high and the patches needed potentially fairly specific to GHC. So no one has done that yet.
Below are the issues that the LLVM Mangler addresses in the assembly code.