~/talk

How Compilers Work: Introduction to LLVM Passes

Talkat C++ on Sea 2022 · 2022-07-05..07-07· [compilers-and-language-design]
links:none on file
slides:none on file

Step‑by‑step C++ shows how to implement, CMake and register an out-of-tree plugin for opt, including the minimal "hello world" pass that prints each function name and argument count and can be scheduled twice from the command line. It builds a real transformation that replaces 8-bit adds with an equivalent MB-algebra sequence, verifies correctness with lli (example returns 10) and reports 3 replacements via opt stats, and it builds a standalone analysis tool (static call counter), plus LIT-based tests from the llvm-tutor repo.

AI-written summary · about

  1. 0:00LLVM and passes intro
  2. 3:18Setting up LLVM env
  3. 12:19Hello world LLVM pass
  4. 23:24Transformation pass
  5. 34:21Analysis tool
  6. 43:35Testing passes with Lit
  7. 49:34Debugging LLVM tips
  8. 51:40Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.