At 9:20 AM +0200 10/22/04, Leopold Toetsch wrote:
Dan Sugalski wrote:
At 5:34 PM +0200 10/21/04, Leopold Toetsch wrote:

The question is: is saveall supposed to copy registers or just prepare a fresh set of registers.

What about that?

Missed that, sorry. A copy.

and we see where we go from there. I'm not inclined, yet, to drop the register stacks and the push/pop ops as there are certainly times when it's useful, being a quick way to spill and unspill a set of registers for a basic block.

Not really IMHO. It doesn't get you more addressable registers, i.e. you can always access ony e.g. 2 x 16 at once. With spilling into an array the range of "registers" is extended.
If a basic block got such a behavior that it needs more registers locally then allocation of these registers isn't a problem. And in praxis you don't have that anyway, because a basic block is *branchless* per definition.

I realize that a basic block's branchless, Leo. What I was talking about was the *entry* (or exit) to a basic block. If you have a looping block construct:


    FOO
     |
     V
    BAR<-+
     +---+
     |
     V
    BAZ

where the BAR basic block either is entered from the beginning or looped into, the register coloring code is in a position to do some save optimizations. It *could* spill the used registers, or it could just push the whole set onto the register stack and start fresh, popping off the old set when the code's done.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to