Re: Register Allocation

cik@l.cc.purdue.edu (Herman Rubin)

          From comp.compilers

Related articles
[21 earlier articles]
Re: Register allocation thibault.langlois@di.fc.ul.pt (thibault.langlois@di.fc.ul.pt) (2005-05-20)
Re: Register allocation c3riechers@adelphia.com (Chuck Riechers) (2005-05-21)
register allocation camille@bluegrass.net (David Lindauer) (2005-11-12)
register allocation dgb@cs.washington.edu (1989-11-22)
Re: register allocation larus@primost.wisc.EDU (1989-11-24)
Register Allocation napi@rangkom.MY (1990-02-17)
Re: Register Allocation cik@l.cc.purdue.edu (1990-02-15)
Re: Register Allocation wendyt@cs.washington.edu (1990-02-26)
Re: Register Allocation Moss@cs.umass.edu (1990-02-25)
Re: Register Allocation dds@cc.ic.ac.uk (1990-02-27)
Register Allocation nandu@jupiter.cs.clemson.edu (1993-03-31)
Register Allocation rajiv@polya.ece.wisc.edu (1993-08-31)
Re: Register Allocation preston@dawn.cs.rice.edu (1993-09-06)
[1 later articles]
| List of all articles for this month |
From: cik@l.cc.purdue.edu (Herman Rubin)
Newsgroups: comp.compilers
Keywords: Pointers
Summary: It is not possible on most computers without excessive cost
References: <1990Feb20.155619.3121@esegue.segue.boston.ma.us>

In article <1990Feb20.155619.3121@esegue.segue.boston.ma.us>, napi@rangkom.MY (Mohd Hanafiah b. Abdullah) writes:
> How does one perform register allocation on scalar variables that may
> be pointed to by others?
>
> I am curious because, a pointer assumes that the variable it points to
> resides in memory, but in actuality the variable resides in a register.
>
> I am sure there is a solution to this problem and has been asked before
> in the newsgroup, but could you please e-mail the answer to me anyway?


Unfortunately, this is not the case. I have frequently wanted to do this,
and I have no difficulty using machine language. The only mainframes whose
instruction set I have known which are appropriately set up in hardware for
this are the long obsolete UNIVAC 1108 and 1110. There are some I have seen
for which this can be done with difficulty, but it would not be faster than
keeping the items in memory.
[The PDP-10/DEC-20 has addressable registers as well, but as pointed out
elsewhere that's only a small part of the problem. As soon as you call
another routine, it's liable to save the register and put something else
there, and you lose. -John]





Post a followup to this message

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