ghc llvmbackend workshop (this set of slides is just a draft)
DESCRIPTION
http://cotocoto.jp/event/39693TRANSCRIPT
GHC LLVMBackend Workshop
May 8, 2010Osaka, Japan
Tatsuhiro Ujihisahttp://ujihisa.blogspot.com/
GHC?
•The most common Haskell compiler
•More features than Haskell98 specification
LLVM?
•Low Level Virtual Machine
•A virtual machine for arbitrary environments
•(like JVM for C)
GHC × LLVM
Demo
☜ What I did?
• "fib" app on normal GHC
• "fib" app on LLVM GHC
• benchmarks of them
Differences
•What do they change from and to?
•GHC:
•Haskell -> Executable
•LLVM GHC:
•Haskell -> LLVM Assembly Language
LLVM Assemby Language (1/2)
•Platform-independent Assembly Language
• Infinite number of (virtual) registers
•All registers are referential transparent
LLVM Assemby Language (2/2)
•Can call all C functions
•other features are almost same as other common assembly languages such as IA-32
Advantage?☞ Optimizer!
(to be continued...)