Indirect call promotion (ICP)
The compiler replaces a call through a function pointer with a comparison and a direct call to whichever target the profile says it almost always hits.
A call through a pointer can't be inlined, because the compiler has no idea where it goes. Profile-guided optimization can find out: during the training run, each indirect call site records which addresses it actually jumped to. If one target dominates, the site is rewritten as if (fp == hot_target) hot_target(); else fp();. The direct branch can then be inlined, and everything inlining usually unlocks follows.
It works for plain function pointers and virtual calls alike, which makes it the profile-driven cousin of devirtualization. GCC does it through value profiling under -fprofile-use; LLVM has a dedicated pass. The cost is code size and an extra compare — and a stale profile means the compiler carefully builds a fast path nobody takes anymore.