Re: Register Allocation (Herman Rubin)

          From comp.compilers

Related articles
[21 earlier articles]
Re: Register allocation ( (2005-05-20)
Re: Register allocation (Chuck Riechers) (2005-05-21)
register allocation (David Lindauer) (2005-11-12)
register allocation (1989-11-22)
Re: register allocation larus@primost.wisc.EDU (1989-11-24)
Register Allocation napi@rangkom.MY (1990-02-17)
Re: Register Allocation (1990-02-15)
Re: Register Allocation (1990-02-26)
Re: Register Allocation (1990-02-25)
Re: Register Allocation (1990-02-27)
Register Allocation (1993-03-31)
Register Allocation (1993-08-31)
Re: Register Allocation (1993-09-06)
[1 later articles]
| List of all articles for this month |

From: (Herman Rubin)
Newsgroups: comp.compilers
Keywords: Pointers
Summary: It is not possible on most computers without excessive cost
References: <>

In article <>, 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.