Changes between Version 6 and Version 7 of Commentary/Compiler/Backends/LLVM/WIP
- Timestamp:
- 03/23/10 21:25:33 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/Backends/LLVM/WIP
v6 v7 16 16 The LLVM IR is modeled in GHC using an algebraic data type to represent the first order abstract syntax of the LLVM assembly code. The LLVM representation lives in the 'Llvm' subdirectory and also contains code for pretty printing. This is the same approach taken by EHC's LLVM Back-end, and we adapted the module developed by them for this purpose. 17 17 18 The current design is overly complicated and could be faster. It uses String + show operations for printing for example when it should be using FastString + Outputable. Before simplifying this design though it would be good to investigate using the LLVM API instead of the assembly language for interacting with LLVM. This would be done most likely by using the pre-existing Haskell LLVM API bindings found [http://hackage.haskell.org/package/llvm here]. This should hopefully provide a speed up in compilation speeds which is greatly needed since the LLVM back-end is ~2x slower at the moment.18 The current design is overly complicated and could be faster. It uses String + show operations for printing for example when it should be using !FastString + Outputable. Before simplifying this design though it would be good to investigate using the LLVM API instead of the assembly language for interacting with LLVM. This would be done most likely by using the pre-existing Haskell LLVM API bindings found [http://hackage.haskell.org/package/llvm here]. This should hopefully provide a speed up in compilation speeds which is greatly needed since the LLVM back-end is ~2x slower at the moment. 19 19 20 20 === TABLES_NEXT_TO_CODE ===
