Tail recursion elimination is a special case of tail call elimination in which the tail call is a call to the function itself. In that case the call can be replaced by a jump to the start of the function after moving the new arguments to the appropriate registers or stack locations.

This ProgramOptimization changes linear stack usage into constant stack usage and is especially important in the compilation of functional programming languages in which recursive functions are used instead of loops.

-- EelcoVisser - 06 Dec 2001


CategoryOptimization

Revision: r1.1 - 06 Dec 2001 - 22:52 - EelcoVisser
Transform > ProgramOptimization > TailRecursionElimination
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback