5 questions to test your understanding
A compiler inlines the call `square(5)`, replacing it with `5 * 5` in the caller. What optimization is most likely to follow immediately?
A function called from 50 different sites is aggressively inlined everywhere. What is the primary risk that could make this slower than not inlining?
The primary benefit of procedure inlining is often not the elimination of call overhead itself, but enabling subsequent optimizations like constant propagation and dead code elimination that become visible only after inlining.
Recursive functions are ideal candidates for inlining because their repeated structure creates many opportunities for constant propagation and loop optimization.
Why is procedure inlining typically performed early in the compiler's optimization pipeline rather than as one of the last passes?