|Summary -- Caller vs. Callee Saves email@example.com (1994-04-06)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-04-21)|
|Re: Caller/Callee saved Registers email@example.com (1994-04-22)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-04-23)|
|Re: Caller/Callee saved Registers email@example.com (1994-04-26)|
|From:||firstname.lastname@example.org (Barton C. Massey)|
|Keywords:||registers, optimize, summary|
|Organization:||University of Oregon Computer and Information Sciences Dept.|
|Date:||Wed, 6 Apr 1994 19:46:40 GMT|
I've been exchanging e-mail with various people and talking around the
dept. about the thrills and agonies of various argument-passing
conventions. I thought I'd summarize the current state of my thinking in
case anyone's interested. Thanks much to those who sent me e-mail --
particularly Samuel Paik and Anton Ertl. Any bogosity herein is
definitely mine and not theirs.
For C code, the consensus is that a mixture of caller-saves and
callee-saves registers gives better performance than either alone.
There's apparently an SP&E article (although I fear I haven't the
reference) which shows performance for a mixed strategy is almost as good
as global optimization of saves. No one knows how much tail-call would
help in C code, although my personal intuition after browsing through some
C code is that it would help a lot more than one might expect. Argument
registers must be caller-save if all calls in tail position are to be made
tail-calls -- fortunately, argument registers are caller saves in most
calling conventions. If the slight extra complexity of a mixed strategy
is undesirable, it is probably better to make everything caller-saves than
callee-saves, again because of caller-saves arguments.
For other languages, particularly those without imperative-style iteration
constructs, tail-call must be very efficient. Thus on register-starved
machines it is probably best to make everything caller-saves, so that all
arguments can be passed in registers. At any rate, it is nice if the
architecture-standard calling conventions allow tail-call in all tail
positions, so that e.g. Scheme implementations don't have to roll their
Comments or corrections?
Return to the
Search the comp.compilers archives again.