Changes between Version 1 and Version 2 of LlvmBackend

Aug 17, 2009 2:45:10 PM (6 years ago)

add note on llvm IR.


  • LlvmBackend

    v1 v2  
    4949Until the amount of shared code can be determined and the LLVM back-end approaches a level of maturity that is suitable for inclusion in ''GHC HEAD'', this is probably a mute issue. 
     51=== LLVM IR Representation === 
     53Still undecided on best way to represent and emit the LLVM IR. There are 3 main options as outlined in the [ LLVM FAQ]: 
     55  * Call into LLVM Libraries using FFI (can probably use [ Haskell LLVM Bindings]) 
     56  * Emit LLVM Assembly (approach taken by [ EHC]'s LLVM Back-end, can use the [ module] developed by them for this) 
     57  * Emit LLVM Bitcode (can't see any reason to do this) 
     59This is something I am currently investigating. I think at the moment that using both EHC's LLVM module and the LLVM Bindings would be best. My main concern with the LLVM bindings is that I'm not sure how well it could handle representing the LLVM IR during translation from ''!CmmStmts''. This is, I need a representation of the LLVM IR to work with during translation from ''!CmmStmts'' that can be easily built up and changed (an abstract syntax form of LLVM IR). However instead of pretty printing it to LLVM Assembly, it would be ''pretty printed'' to LLVM Bitcode using the LLVM Bindings.