Skip to content

Lexicon Entry

Instruction Selection

The compiler backend phase that maps target-independent IR operations to actual machine instructions. LLVM uses SelectionDAG and GlobalISel for this stage.

Related Knowledge & Cross-References

Guide

Write a Compiler from Scratch in C: Build a Working Toy Compiler

Learn how to write a compiler from scratch in C. Build a complete toy compiler with a hand-written lexer, recursive descent parser, and code generator targeting x86-64 and ARM64 assembly.

Guide

Compiler Code Generation: How LLVM Turns IR into x86-64 and ARM64 Assembly

Between the hardware-agnostic world of Intermediate Representation and the raw binary bytes your CPU executes lies the backend pipeline. Learn how the compiler turns abstract logic into platform-specific machine code.

Guide

The Ultimate Guide to Compiler Optimization Passes: Boosting Performance with -O2

You have written your code, but how does the compiler make it run three times faster when you enable optimizations? We demystify compiler optimization passes and see exactly what happens under the hood.

Guide

How a C Program Becomes Machine Code: The C Compilation Process Explained

Trace the complete C compilation process from source code to executable binary. See each stage — preprocessing, compilation, assembly, and linking — with real GCC and Clang output across x86-64 and ARM64.