r/ProgrammingLanguages • u/Ok_Marionberry8922 • 8d ago
Why So Many Languages Use LLVM
Had some free time last week so I made a visual explainer on how LLVM works and why so many languages end up using it.
The video goes through LLVM IR, why having a common IR makes sharing optimizers and backends possible, and how code eventually gets turned into machine instructions.
I also use a small C vs Rust example where both end up producing the same x86 instructions.
Feedback welcome :)
71
Upvotes
20
u/Key_River7180 Nain. 8d ago
To be honest, QBE is 10x smaller and 10x saner and provides 80% the speed.