Pass manager
The part of an optimising compiler that decides in which order passes run and keeps track of which analysis results are still valid.
A modern optimiser is a long chain of small passes — inlining, constant propagation, dead code elimination — each of which needs analyses such as dominator trees or alias information. Recomputing them before every pass would be wasteful; reusing them after the code has changed would be wrong. The pass manager caches analyses and has each pass report what it preserved, so everything else can be invalidated.
LLVM rewrote its own from scratch; the new pass manager became the default for the optimisation pipeline in LLVM 13 in 2021, after years of the two living side by side. With opt -passes='...' the pipeline can be assembled by hand. GCC lists its passes in passes.def. The perennial question no manager solves is phase ordering — which sequence produces the best code depends on the program, and finding it is NP-hard.