Function specialization
Having the compiler copy a function and optimize the copy for a particular argument value, rather than inlining it everywhere.
A sort routine always called with the same comparison function pointer gets much faster once that pointer is known: the call can be inlined and the loop optimized around it. Inlining would achieve the same, but it copies the whole body into every call site. Specialization makes one clone per interesting argument value and redirects the calls that match. GCC does it as part of interprocedural constant propagation (ipa-cp); LLVM grew a dedicated FunctionSpecialization pass around 2021.
The hard part is choosing. Each clone costs code size and compile time, and it only pays off if the constant actually unlocks something — a dead branch, a known trip count, an inlinable call. Monomorphization in Rust and C++ templates does essentially the same thing, except the language demands it and nobody asks whether it was worth it.