Talk
Beginner
First Talk

LLVM IR Is A Reasonable Programming Language

Review Pending

Systems programming languages offer significant speed advantages due to compile-time analyses and optimisations. Given that a good number of systems languages are built on the LLVM toolchain, examining how language front-ends like C/C++ (clang), Rust, and others represent code in their compilers’ intermediate compilation passes can unlock a whole new perspective in understanding optimisations that follow.

This talk will demonstrate that LLVM IR is a readable and understandable programming language, not just a tool for compiler specialists. We will explore its core libraries, including its strong type system, how basic blocks structure control flow, and the critical role of the Static Single Assignment (SSA) form and phi nodes. We'll also see how common optimizations like inlining, tail call elimination, and leveraging SIMD instructions manifest at this level.

It is surprisingly easy to treat LLVM IR as a language of its own right. With the right knowledge of how LLVM constructs maps to assembly, one can write blazingly fast code without needing a language at all!

In cases where extreme performance is paramount, such as in High-Frequency Trading (HFT) or High-Performance Computing (HPC), writing code in a level lower than the programming language itself will enable you to harness machine- and context-specific optimisations that language front-ends may fail to realise.

To illustrate this practically, our talk will showcase a hand-optimised grep-like application written directly in LLVM IR. We will demonstrate how explicitly leveraging low-level features like SIMD operations can yield significant performance gains over a conventionally compiled version.

Expected duration: 20 - 22 mins.

  • Ability to read and understand LLVM IR.

  • Insight into compiler optimisation techniques from the IR level.

  • A burning desire to ditch your favourite low-level programming language in favour of a compiler IR!!!

Technology architecture
Engineering practice - productivity, debugging
Which track are you applying for?
Compilers, Programming Languages and Systems Devroom

Vyasa M Nayak
Software Engineer Verifone Inc.
https://www.linkedin.com/in/vyasa-m-nayak/
Speaker Image
Muhammad Saheed
Student | GSoC Contributor FreeBSD
https://saheed.tech/
Speaker Image

0 %
Approvability
0
Approvals
0
Rejections
0
Not Sure
No reviews yet.