Re: managing register spills? (Preston Briggs)
13 Jun 1997 22:04:17 -0400

          From comp.compilers

Related articles
managing register spills? (1997-06-10)
Re: managing register spills? (Cliff Click) (1997-06-13)
Re: managing register spills? (1997-06-13)
Re: managing register spills? (David L Moore) (1997-06-13)
| List of all articles for this month |

From: (Preston Briggs)
Newsgroups: comp.compilers
Date: 13 Jun 1997 22:04:17 -0400
Organization: Rice University
References: 97-06-030
Keywords: registers, code, optimize, comment

George C. Lindauer <> wrote:
>It seems easy enough, but suppose I have two register banks, register
>bank A and register bank B. All the registers in both banks are
>overused and have spilled. Now I want to move a value from bank A to
>bank B, allocating a new register in bank B and freeing the old one
>from bank A. Clearly, the free will cause an unspill, and the
>allocate will cause a spill. But if I free the bank a register BEFORE
>the move I've lost the value I want to move. And if I free it AFTER
>the move this is invalid because I've spilled from bank B and since I
>am using a stack to manage the spills the bank A unspill value is no
>longer available. An exchange instruction would be nice about
>now... unfortunately I don't have one.
>What do I do?

I don't understand exactly what you're talking about here, but I think
the problem comes down to the fact that you're trying to use a stack
for spills. Don't. I mean, it's fine to store spilled values on the
stack frame, but don't try and maintain a stack discipline for all of
them. Much more difficult, and perhaps impossible.

Also, you could refuse to work on machines that have multiple register
banks. People shouldn't be building machines that we don't know how
to compile for.

And I shouldn't end sentences with prepositions.

Preston Briggs
[Hmmn, better tell Motorola. -John]

Post a followup to this message

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