|managing register spills? email@example.com (1997-06-10)|
|Re: managing register spills? firstname.lastname@example.org (Cliff Click) (1997-06-13)|
|Re: managing register spills? email@example.com (1997-06-13)|
|Re: managing register spills? firstname.lastname@example.org (David L Moore) (1997-06-13)|
|From:||email@example.com (Preston Briggs)|
|Date:||13 Jun 1997 22:04:17 -0400|
|Keywords:||registers, code, optimize, comment|
George C. Lindauer <firstname.lastname@example.org> 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.
[Hmmn, better tell Motorola. -John]
Return to the
Search the comp.compilers archives again.