Beginner Resources + Documentation

Quicklinks to documentation and other resources for beginners.

LLVM (https://llvm.org/docs/index.html)

Accessing LLVM sources, building, development policies…

Language References

Programming LLVM-Style

Tutorials and Books

16 Likes

Great initiative!

Perhaps some of the following may also be of help: https://gist.github.com/MattPD/00573ee14bf85ccac6bed3c0678ddbef#program-analysis-resources.
In particular:

Examples in the repository: https://github.com/llvm/llvm-project/tree/main/llvm/examples

These are particularly good programming-by-example tutorials:

The Architecture of Open Source Applications (AOSA): LLVM: The Architecture of Open Source Applications: LLVM
How Clang Compiles a Function: How Clang Compiles a Function – Embedded in Academia
How LLVM Optimizes a Function: How LLVM Optimizes a Function – Embedded in Academia
Life of an instruction in LLVM: Life of an instruction in LLVM - Eli Bendersky's website
A Tourist’s Guide to the LLVM Source Code: http://blog.regehr.org/archives/1453

3 Likes

For those that want a university course, I cannot recommend Adrian Sampson’s Self paced compiler course enough.

It is:

  • not concerned at all with the parsing front end, and starts programming language agnostic
  • concerned mostly with understanding the core data structures
  • heavily focused on optimizations and how to add passes into them
  • Curated by a well edited videos and useful advice for compiler hackers
8 Likes

There’s also Static Program Analysis - DCC888 by Fernando Pereira, a class where “the goal is to introduce the student to the most recent techniques that compilers use to analyze and optimize programs. The student will learn about dataflow and constraint based program analyses. He or she will have contact with type systems, and the many variants of inductive techniques to prove properties about programs.”

1 Like