Related articles |
---|
[28 earlier articles] |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-29) |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-03-29) |
Re: Caller/Callee saved Registers pardo@cs.washington.edu (1994-03-31) |
Re: Caller/Callee saved Registers conway@munta.cs.mu.OZ.AU (1994-04-02) |
Summary -- Caller vs. Callee Saves bart@cs.uoregon.edu (1994-04-06) |
Re: Caller/Callee saved Registers nandu@cs.clemson.edu (1994-04-21) |
Re: Caller/Callee saved Registers preston@noel.cs.rice.edu (1994-04-22) |
Re: Caller/Callee saved Registers hbaker@netcom.com (1994-04-23) |
Re: Caller/Callee saved Registers preston@noel.cs.rice.edu (1994-04-26) |
Newsgroups: | comp.compilers |
From: | preston@noel.cs.rice.edu (Preston Briggs) |
Keywords: | registers, optimize |
Organization: | Rice University, Houston |
References: | 94-04-033 94-04-147 |
Date: | Fri, 22 Apr 1994 15:29:20 GMT |
nandu@cs.clemson.edu writes:
>Henry Baker referred to Guy Steele's paper "Dream of a Lifetime:..." in
>the 1980 LISP conference. Steele's idea quickly degenerates to a callee
>saves scheme with additional overhead.
>
>Steele's idea is to save the intersection of the registers that the caller
>and callee require.
No! While several people _have_ proposed such a thing; Steele and
Sussman's paper is much more interesting. They propose an alternative
resource called "racks". Rather than a set of registers and a stack,
their machine would have a set of these racks. A rack has 4 operations:
Assign(R, V) -- make V the current value of the rack R
Fetch(R) -- return the current value of the rack R
Save(R) -- save (probably on an internal stack) the current
value of the rack R
Restore -- restore the current value of the rack R
Consider the following sequence, for an example
Assign(R, 1)
Fetch(R) -- returns 1
Fetch(R) -- returns 1
Assign(R, 2)
Fetch(R) -- returns 2
Save(R)
Assign(R, 3)
Fetch(R) -- returns 3
Restore(R)
Fetch(R) -- returns 2
So, obviously we can use a bunch of these things as registers, simply
issuing Saves and Restores around procedure calls.
Steele and Sussman described 4 simple implementations of the rack
abstraction and compared them experimentally. I won't describe them (read
the paper!), but I can assure you that the idea does _not_ "quickly
degenerate to a callee-saves scheme with additional overhead." On the
other hand, I don't expect to see the idea taking over the risc community.
The complete reference is
The Dream of a Lifetime: A Lazy Variable Extent Mechanism
Steele and Sussman
Conference Record of the 1980 LISP Conference
Preston Briggs
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.