Re: Caller/Callee saved Registers

zsh@cs.princeton.edu (Zhong Shao)
Fri, 25 Mar 1994 05:44:19 GMT

          From comp.compilers

Related articles
[12 earlier articles]
Re: Caller/Callee saved Registers ghiya@flo.cs.mcgill.ca (1994-03-24)
Re: Caller/Callee saved Registers paulb@travis.csd.harris.com (1994-03-24)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-24)
Re: Caller/Callee saved Registers bart@cs.uoregon.edu (1994-03-25)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-25)
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-25)
Re: Caller/Callee saved Registers zsh@cs.princeton.edu (1994-03-25)
Re: Caller/Callee saved Registers law@fast.cs.utah.edu (1994-03-26)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26)
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-26)
Re: Caller/Callee saved Registers anton@mips.complang.tuwien.ac.at (1994-03-28)
Re: Caller/Callee saved Registers zsh@cs.princeton.edu (1994-03-27)
[11 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: zsh@cs.princeton.edu (Zhong Shao)
Keywords: registers, ML, bibliography
Organization: Princeton University
References: 94-03-054
Date: Fri, 25 Mar 1994 05:44:19 GMT

|> I'm having some difficulty grasping the key idea behind the division in
|> caller/calleesaved registers:


We have recently written some papers on how to make good use of
callee-save registers in compiling functional languages (e.g., ML), where
register saving across procedure call is a even more serious issue because
functional programs often make much larger number of function calls. These
papers are available for anonymous ftp at "ftp.cs.princeton.edu" in the
"pub/ml/zsh/" directory:


    (a) "pub/ml/zsh/closure.ps":


            "Space-Efficient Closure Representations" (to appear in LFP94)
            by Zhong Shao and Andrew W. Appel


    (b) "pub/ml/zsh/callee.ps":
            [this one is written in 1991, and a bit out of date, but reading
              this will make reading the first one easier.]


            "Callee-save Registers in Continuation-Passing Style"
                                  (also in Lisp & Symbolic Computation 5(3), 1992)
            by Andrew W. Appel and Zhong Shao


Both contain references to other previous papers on "callee-save
registers".


Our main idea is to use compile-time variable lifetime information and
control flow information to guide the decision of choosing which variables
are callee-saved, and which variables are caller-saved. Our technique can
be easily applied to compilers for other languages, but I don't know
whether they will get same speedup as our compiler (the SML/NJ compiler)
does.


Tail-recursions can be implemented more efficiently in callee-save
registers than on the stack. General recursions can also benefit from
callee-save registers, because good use of callee-save registers can make
each frame (activation record) smaller. For details, see examples in the
above paper "Space-Efficient Closure Representations".


-Zhong Shao
(zsh@cs.princeton.edu)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.