LLVM RAGreedy Register Allocator Internals: Allocation, Eviction, Splitting, and Spilling Mechanics
Core Core Data Structures
Structure
Purpose
LiveIntervals
Stores live ranges for every virtual register
LiveRegMatrix
Tracks physical-to-virtual mappings and interference
PriorityQueue
Heap-based queue ordered by Priority
VirtRegMap
Final virtual → physical assignment
EvictAdvisor
Decides whether evicting an existing allocation i ...
Posted on Wed, 13 May 2026 03:59:11 +0000 by dnice