Getting Started with LLVM - Build Your Own Compiler

We cordially invite you to the hands-on workshop for “Getting Started with LLVM - Build your own Compiler” organized by Saarland University. This hands-on workshop will take place in-person at Johannes Gutenberg University Mainz on October 23-24. We will start Thursday, 23rd, at 10:00 and conclude at 16:00 on Friday, 24th. A hybrid attendance option might be available, but is still in evaluation. Please indicate your preference in the registration. Registration closes October 20th - the number of slots is limited. You will receive a manual confirmation via E-Mail that your registration is confirmed.

Register here: https://forms.office.com/e/T6LxxpWCea

High-performance computing strives to make the most out of the available hardware. For this, optimizing-compilers are irreplaceable. They enable developers to write high-level, maintainable code that is compiled down to highly efficient architecture specific code. Often, the compiler is viewed as a black hole of magic that no one should touch. But what if, you were able to adapt your compiler and help it understand and thus optimize your code even better?

To help the compilers optimize scientific code even better, domain-specific languages are used to encode high-level domain knowledge into the compiler. The de facto standard infrastructure to build such compilers on, is the LLVM framework, used in industry and academia alike.

This workshop will provide you with a foundational understanding of how a compiler operates and how it optimizes code. With this knowledge, you will work on bite-sized hands-on tasks that will culminate in a compiler that optimizes your own embedded domain-specific language.

Specifically, we will cover:

  • Theory:
    • The parts of a compiler.
    • Why is there an intermediate representation and how does it look like? What is SSA form?
    • How can you integrate (opposed to simply using) a compiler in your project?
  • Hands-on:
    • How to inspect what an LLVM compiler generates at the stages of the compiler.
    • Constructing LLVM IR from an embedded C++ DSL.
    • Making the LLVM IR executable.
    • Optimize the generated program with a domain-specific optimization.
    • How to use JIT compilation to optimize your workflow on the fly.

We will go through the material together, so bring your laptop. More details (e.g. link to a docker image) will be provided in the days before the workshop.

Organizer: Joachim Meyer

Participation is free of charge for attendees from German universities, academic computing centers, and research institutions. Please only register for the course if you are really going to attend.