function calls
Preston Briggs
preston at titan.rice.edu
Fri Mar 16 05:31:21 AEST 1990
In article <1990Mar15.173408.29622 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <14268 at lambda.UUCP> jlg at lambda.UUCP (Jim Giles) writes:
>>1) Save/restore all register values that are still 'live' values for the
>> caller. ... The problem is: _MOST_ of the procedure call
>>overhead is concentrated in number (1)!
>The correct statement is that the callee must save/restore all register
>values that are still live for the caller *and that the callee is going
>to overwrite*. Careful register-allocation conventions (with an adequate
>supply of registers) can minimize that number, usually to zero in the case
>of leaf functions.
And of course there are register windows of various kinds.
They don't solve the register allocation problem, but they
do help reduce call overhead, at some expense to task
switching overhead (but we know which is more common).
On the other hand, Wall argues that link-time register
allocation can surpass register-window performance.
See his paper
Register Windows vs. Register Allocation
D. W. Wall
Proceedings of the SIGPLAN '88 Conference on
Programming Language Design and Implementation
--
Preston Briggs looking for the great leap forward
preston at titan.rice.edu
More information about the Comp.lang.c
mailing list