Newsgroups: comp.arch
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Register usage [was Re: 80486 vs. 68040 code size]
Message-ID: <1989May17.172609.20240@utzoo.uucp>
Organization: U of Toronto Zoology
References: <949@aber-cs.UUCP>
Date: Wed, 17 May 89 17:26:09 GMT

In article <949@aber-cs.UUCP> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes:
>    You forgot one condition:  ancient and stupid compiler.  Do remember, also,
>    that most any compiler for the 11 was full of implicit assumptions to the
>    effect that very few registers were available.
>
>Now I may be totally wrong, but I seem to remember that they used PCC and tuned
>its (bastardized) Sethi Ullman register allocator, which is both pretty
>good (even the [S]CC one was quite good) and with no assumptions at all.

PCC is almost a toy by modern standards.  The code it generates for a single
expression isn't bad -- it's not always perfect, but it's not bad, if the
person who ported the compiler did a good job -- but the near-total lack of
more global optimization is a performance disaster.  PCC was designed for
portability first and code quality second, at a time when compiler porting
was not nearly as well understood as it is today.

And note that I said "*implicit* assumptions" (emphasis added).  I'm not
talking about "#define MAXREGS 6", but about things like choices of
strategy based on the notion that registers are scarce and costly and it
is very important not to occupy them unnecessarily.
-- 
Subversion, n:  a superset     |     Henry Spencer at U of Toronto Zoology
of a subset.    --J.J. Horning | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
