Leaf subroutine

From HandWiki
Revision as of 19:06, 4 August 2021 by imported>PolicyEnforcerIA (attribution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Subroutines in computer science

A leaf subroutine is a subroutine which cannot in turn call another subroutine. Some compilers can apply special program optimizations to leaf subroutines, such as the use of link registers to avoid having to push the return address on the stack.

The term "leaf" refers to their position as leaf nodes in the call graph of the program.