Date
Wednesday, October 28, 2026
Name
A Beginner's Guide to Loop Unrolling in LLVM
Session Type
Tutorial
Abstract

Loop unrolling is often introduced as a straightforward compiler transformation. This tutorial connects an introductory understanding of unrolling to LLVM’s production implementation. It covers full, upper-bound, partial, and runtime unrolling; how LLVM selects a form and factor; and how explicit requests and target preferences affect the result. It then examines the opportunities unrolling can expose for downstream passes such as SROA and the LoadStoreVectorizer, followed by a brief discussion of related transformations such as peeling, unroll-and-jam, rerolling, and the Loop Vectorizer’s interleaving. After the tutorial, attendees should be able to reason about why LLVM made a particular unrolling decision, understand its consequences for code size and later optimizations, and know where to begin investigating or changing that behavior.

Location Name
Grand Ballroom