IT lexicon › Programming › GlobalISel

GlobalISel

Programming På svenska → Updated: 2026-11-05

LLVM's newer instruction-selection framework, which works on a whole function rather than one basic block at a time and skips the separate graph altogether.

Work began around 2015, with Apple as the driving force. Instead of building a DAG per block, LLVM IR is translated directly into generic machine IR, where instructions such as G_ADD are not yet tied to any target. Four passes follow: IRTranslator, Legalizer to rewrite what the target cannot handle, RegBankSelect to choose between, say, integer and floating-point registers, and InstructionSelect.

Because everything happens on one representation, custom passes can be slotted in anywhere and patterns can cross block boundaries. GlobalISel is the default at -O0 on AArch64, where compile time matters most. Replacing SelectionDAG outright has proved a long haul: every target carries fifteen years of hand-tuned special cases that have to be rewritten.

← Back to the lexicon