Jump to content

Leaf subroutine

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Anome (talk | contribs) at 23:04, 19 September 2009 ({{compsci-stub}} created; The term "leaf" refers to their position in the call graph of the program.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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 in the call graph of the program.