function calls

David R. Chase drc at cs.brown.edu
Sat Mar 17 17:59:18 AEST 1990


In article <12350 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
>What I would like to see is a register-set that acts as the cache for
>a virtual stack in a machine with true stack machine instructions. That
>would be my idea of a really good time, although it might put some graph
>colorers out of business, having no registers to allocate.

Not at all.  No doubt the "hardware stack" will be of finite size, and
if that is exceeded then some of it must be saved to memory.  In this
situation, you'll win if stack frames aren't so large, and one way to
do that is to allocate stack slots using algorithms very much like
those used to allocate registers.  Spilling won't occur, of course,
since you can have as many "registers" as are needed, but they don't
come for free.  Use fewer and (ignoring scheduling problems caused by
spurious dependences on reused registers) do better.

Hard life, isn't it?

David
(really in Menlo Park, CA)



More information about the Comp.lang.c mailing list