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

43 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: A Tourist’s Guide to the LLVM Source Code – Embedded in Academia

10 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
18 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.”

8 Likes

Hi @barrelshifter ,
I am presented with 404 Not Found upon clicking link mapping-high-level-constructs-to-llvm-ir ( https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/README.html ) . Can you please review and assist ?
Regards,
@ramumsrk

Happened to me as well. New link:
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/

Thanks a lot for your help and assistance @tschuett

Sorry for the delay. Updated.

Where can I report outdated / erroneous docs? The Kalidoscope JIT tutorial does not work for 16.0.x.

Please file a GitHub issue with the Documentation tag:

1 Like

Will do.