Re: Caller allocates space for callee-save registers

pardo@cs.washington.edu (David Keppel)
Mon, 15 Jun 1992 23:59:17 GMT

          From comp.compilers

Related articles
[13 earlier articles]
Re: Caller allocates space for callee-save registers preston@dawn.cs.rice.edu (1992-06-04)
Re: Caller allocates space for callee-save registers pardo@cs.washington.edu (1992-06-04)
Re: Caller allocates space for callee-save registers andrew@rentec.com (1992-06-05)
Re: Caller allocates space for callee-save registers henry@zoo.toronto.edu (1992-06-05)
Re: Caller allocates space for callee-save registers pardo@cs.washington.edu (1992-06-09)
Re: Caller allocates space for callee-save registers andrew@rentec.com (1992-06-11)
Re: Caller allocates space for callee-save registers pardo@cs.washington.edu (1992-06-15)
| List of all articles for this month |

Newsgroups: comp.compilers
From: pardo@cs.washington.edu (David Keppel)
Keywords: optimize, linker, interpreter
Organization: Computer Science & Engineering, U. of Washington, Seattle
References: 92-05-123 92-06-047
Date: Mon, 15 Jun 1992 23:59:17 GMT

>>[Dynamic inlining.]


andrew@rentec.com (Andrew Mullhaupt) writes:
>[It looks useless for code loaded dynamically into an interpreter.]
>[It's hard to find what code gets called in the interpreted language.]


Both the Deutsch-Shiffman Smalltalk-80 Virtual machine and Self allow you
to dynamically introduce V-code (virtual code) and Self does extensive
inlining optimization. As I recall, the Self group turned off dynamic
inlining and the system ran about 100X slower.


>[The interpreter grows endlessly.]


As you add code, the interpreter *has* to grow, by definition. When you
delete code, you can delete all of the inlined instances of that code.


>[It could inflate loops so they don't fit in the cache, etc.]


There are two kinds of code explosion: (a) a single code fragment such as
a loop grows so it will no longer fit in the cache and (b) a routine is
replicated in to so many places that the total code size grows
significantly.


These are also problems with static inlining (and static loop unrolling).
I believe many of the issues are the same for dynamic and static versions.
I also believe there are simple and only moderately conservative
(pessimistic) solutions.


Indeed, if the thing being inlined is small, dynamic inlining can reduce
the code size by eliminating the call, allowing CSE, and by eliminating
spills and restores of caller-save registers. That's the case with small
methods in Self.


If the thing is large, it's rarely got a short execution time, so the call
overhead is a small percantage of the total cost.


%A Craig Chambers
%A David Ungar
%A Elgin Lee
%T An Efficient Implementation of SELF, a Dynamically-Typed
Object-Oriented Language Based on Prototypes
%J OOPSLA '89 Proceedings
%D October 1-6 1989
%P 49-70


%A Peter Deutsch
%A Alan M. Schiffman
%T Efficient Implementation of the Smalltalk-80 System
%J 11th Annual Symposium on Principles of Programming Languages
(POPL 11)
%D January 1984
%P 297-302


;-D on ( Dynamic Tension ) Pardo


--


Post a followup to this message

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