Inlining
The compiler replaces a function call with a copy of the function body, and most of the payoff is in what that enables afterwards.
The call itself is cheap on a modern CPU, but it is a wall for the optimizer: whatever happens on the other side is unknown. Paste the body in and the arguments can be constant-folded, never-taken branches deleted and values kept in registers. That's why inlining is sometimes called the optimization that makes all the others possible.
The price is code bloat. Every copy occupies instruction cache, and an overly generous heuristic makes the program slower. C's inline keyword is these days mostly a linkage rule; the compiler decides for itself. JIT compilers such as HotSpot and V8 go further and inline virtual calls speculatively, behind a guard that bails out if the type assumption turns out wrong.