Jump to content

Leaf routine

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Anome (talk | contribs) at 23:05, 19 September 2009 (as leaf nodes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.