Re: Caller allocates space for callee-save registers

preston@dawn.cs.rice.edu (Preston Briggs)
Mon, 1 Jun 1992 22:45:57 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: Caller allocates space for callee-save registers gaynor@brushfire.rutgers.edu (1992-05-29)
Re: Caller allocates space for callee-save registers henry@zoo.toronto.edu (1992-05-29)
Re: Caller allocates space for callee-save registers andrew@rentec.com (1992-05-31)
Re: Caller allocates space for callee-save registers juul@diku.dk (1992-06-01)
Re: Caller allocates space for callee-save registers andrew@rentec.com (1992-06-01)
Re: Caller allocates space for callee-save registers stephen@estragon.uchicago.edu (1992-06-01)
Re: Caller allocates space for callee-save registers preston@dawn.cs.rice.edu (1992-06-01)
Re: Caller allocates space for callee-save registers leichter@zodiac.rutgers.edu (1992-06-02)
Re: Caller allocates space for callee-save registers pardo@cs.washington.edu (1992-06-03)
Re: Caller allocates space for callee-save registers dalamb@qucis.queensu.ca (1992-06-03)
Re: Caller allocates space for callee-save registers andrew@rentec.com (1992-06-03)
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)
[5 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: preston@dawn.cs.rice.edu (Preston Briggs)
Keywords: registers, optimize
Organization: Rice University, Houston
References: 92-05-123 92-05-159
Date: Mon, 1 Jun 1992 22:45:57 GMT

>>John Mashey [once said]:
>>1. For languages like C on a register-rich machine, careful choice of
>>calling conventions plus a smart compiler can essentially eliminate the
>>performance advantages of windows for real programs.


andrew@rentec.com (Andrew Mullhaupt) writes:


>I would like to point out that important special case where C, C++ or
>other code calls library routines in FORTRAN, e.g. IMSL. Because there
>tend to be lots of nuisance arguments, and most often the code has been
>utterly separately compiled, you end up with poor register use.


Mashey _is_ talking about separate compilation. While interprocedural
register allocation can beat windows, it's not necessary. His claim (and
the claim of others) is that windows help a little at procedure calls, but
only a little. In your example of IMSL routines, I would expect that call
overhead (including register store and reloads) is completely swamped by
the cost of floating-point compuations (i.e., useful work).


Later comments by Spackman support OS-level type checking. Munch noted
that this would only work if it was a single language system. I think
that's an overstatement, but I also think it's true that interfaces should
be checked. Languages like Modula 2, Modula 3, Oberon, Mesa, and probably
Ada and many others, provision is made for interface definitions that
specify the interface without exposing the implementation. So people like
IMSL provide an interface definition and compilers can use the definition
to provide checking. More complete specifications would allow
interprocedural optimization.


The idea of the OS knowing about an interesting type system seems wrong.
Levine says the OS could simply compare tags for equality without knowing
about the types. This only works for the simplest of type systems (and
where is the set of tags defined?). For more interesting and useful type
schemes (a la Oberon, ML, ...) you want much more complex approaches.


Preston Briggs
--


Post a followup to this message

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