mem2reg
The LLVM pass that lifts local variables out of stack memory into SSA registers — sparing every front end the job of building SSA form itself.
Emitting correct SSA straight from a syntax tree is fiddly: the front end has to track which version of each variable is live and where the φ-functions belong. LLVM's answer is to let it off the hook. Clang and most other front ends put every local variable in an alloca, a stack slot, and read and write it with plain load and store. It is perfectly valid IR, just slow.
Then mem2reg runs. For every alloca whose address never escapes, the memory accesses are replaced with SSA values and φ-functions are placed at the iterated dominance frontier. That is why clang -O0 output is so full of memory traffic — the pass simply never ran. In the standard pipeline SROA does the same job and more, but mem2reg remains the instructive miniature of how SSA gets built.