Article View: comp.arch
Article #21324Re: Register usage
From: David Collier-Brown
Date: Thu, 18 May 1989 02:28
Date: Thu, 18 May 1989 02:28
30 lines
1898 bytes
1898 bytes
In article <952@aber-cs.UUCP> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes:
[responding to some factual information on register usage]
>I thank you enormously. This quote greatly cheers me up. This is a very good
>support for my position on "register" (where a competent programmer is
>expected to do this, with great simplication of the compiler, because
>compilers cannot possibly know which variables are the most frequently used
>dynamically).
True if you define "compiler" narrowly (ie, normally). However, if
you think of an optimization "environment", you can justify feeding the
results of a profile back into the compiler to guide register allocation.
I would tend to structure this as an optional "pass" (well, pseudo-pass)
for purely practical reasons...
And if you want to experiment with the idea right now, consider
writing an output processor for a profiler which orders variables by
use in individual functions, and then another utility to rewrite the
source code with register declarations for the X hottest variables
per function iff the call cost/run cost ratio would not be deranged
thereby. (It is fairly hard (:-)).
--dave (only two more days to monomania!) c-b
--
David Collier-Brown, | {toronto area...}lethe!dave
72 Abitibi Ave., | Joyce C-B:
Willowdale, Ontario, | He's so smart he's dumb.
CANADA. 223-8968 |
Technical Details
Message-ID:
<1963@yunexus.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!yunexus!davecbReferences:
<952@aber-cs.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!yunexus!davecb From: davecb@yunexus.UUCP (David Collier-Brown) Newsgroups: comp.arch Subject: Re: Register usage Summary: Compilers **can** do better, but if you don't have a good one Keywords: profile, register allocation Message-ID: <1963@yunexus.UUCP> Date: 18 May 89 02:28:10 GMT Article-I.D.: yunexus.1963 References: <952@aber-cs.UUCP> Reply-To: davecb@yunexus.UUCP (David Collier-Brown) Organization: Bimodal: [Interleaf Canada | York U. Computing Services] Lines: 30