This month, Mark Leone will give us a presentation on how to build a JIT compiler in C++ with LLVM. Food will be provided, so please RSVP so we have a proper head count.
In this talk I'll show how to compile a simple programming language into machine code using the LLVM compiler toolkit. I'll start with a simple lexer (using re2c) that converts a stream of characters into a stream of tokens (e.g. numbers and identifiers), followed by a simple parser (using recursive descent) that produces a syntax tree. Then I'll show how to generate LLVM intermediate code (IR), optimize it, and generate machine code using the LLVM JIT engine. Full source code will be available afterwards.
No compiler experience will be required, although a reasonable familiarity with C++ will be assumed. Check out the LLVM Tutorial (https://llvm.org/docs/tutorial) for a preview of similar material.
About the speaker: Mark Leone has been working with C++ as a graphics software engineer for 20 years. He recently joined the OptiX ray tracing team at NVIDIA here in Salt Lake City. He has over two dozen movie credits for his previous work at Pixar and Weta Digital (in New Zealand).