In this tutorial session, you will learn how to write a pass in LLVM to instrument loads and stores during compilation of a program.
LLVM is written in modern C++, and C++ is the primary language used for writing passes and other software that works with LLVM. Bindings existing for using LLVM in other languages, but the native C++ interface is the most flexible and well-maintained, so we will be using that in this tutorial.
To get the most out of this tutorial, you should:
Getting a development environment set up for writing your own LLVM passes isn't too hard in theory, but it can take a fair amount of time (LLVM+Clang is a large codebase and can take over an hour to compile from source) and might be a bit daunting for those unfamiliar with the LLVM ecosystem. Since we only have an hour for the tutorial, we've prepared a pre-canned Linux-based virtual machine image with a ready-to-go development environment for you to participate in the tutorial.
After you've completed the tutorial, we'd greatly appreciate it if you could fill out a brief (1-page) survey on your experience, so we can improve future versions of this tutorial:
Page © 2019 Ethan Johnson