Status of "Improved LLVM backend"
michal.terepeta at gmail.com
Sun Nov 27 14:17:22 UTC 2016
> I’m trying to implement a bitcode producing llvm backend, which would
> allow to use a range of llvm versions with ghc. However, this is only
> relevant to the improved llvm backend, as Austin correctly pointed
out, as there are
> other complications besides the fragility of the textual representation.
> So this is mostly only relevant to the improved ir you mentioned. The
bitcode code gen
> plugin right now follows mostly the textual ir generation, but tries to
> ubiquitous symbol to i8* casting. The llvm gen turns cmm into ir, at this
> at that point, the wordsize has been embedded already, which means that
> textual llvm gen as well as the bitcode llvm gen try to figure out if
relative access is
> in multiple wordsizes to use llvms getElementPointer.
That sounds interesting, do you know where could I find out more about this?
(both when it comes to the current LLVM codegen and yours)
> I don’t know if generating llvm from stg instead of cmm would be a better
> approach, which is what ghcjs and eta do as far as I know.
Wouldn't a step from STG to LLVM be much harder (LLVM IR is a pretty
representation compared to STG)? There are also a few passes on the Cmm
that seem necessary, e.g., `cmmLayoutStack`.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs