Enter the Dragon: Taming LLVM
LLVM is a compiler infrastructure project, designed as a set of reusable libraries. From humble beginnings as his holiness Chris Lattner's research project, it has recently gained much traction, with compilers for Swift, C, C++, Objective C, Rust, Haskell, etc, using it under the hood.
At it’s core, LLVM features an architecture independent, type safe, instruction set called “LLVM IR”, which LLVM compiles to several instruction sets including x86/x86-64, ARM, Power PC etc. So in essence, if you’re lazy and want to implement a multi platform programming language that runs “natively”, LLVM saves you tons of time and effort.
This talk will go through implementing a very simple compiler (in Swift!) for a very simple, toy programming language, using LLVM.