At 11:09 AM +0200 10/26/04, Leopold Toetsch wrote:
So, if you want that really super efficient, you would allocate registers around function calls directly to that wanted register number, which should be in the SymReg's want_regno.
While true, in the general case leaving 0-15 as non-preferred registers will probably make things easier. Those registers, especially the PMC ones, are going to see a lot of thrash as function calls are made, and it'll probably be easier to have them as scratch registers.
Yep, that's the easy part ;) OTOH when the register allocator is doing register renaming anyway, the most inner loop with a function call should get registers assigned already matching the calling convemtions. With more then one call at that loop level, you have to move around registers anyway.
It's distinctly possible, of course, that there'll be very little pressure to actually *use* them for most code, as we've got plenty of registers in general. That's the hope, at least.
Yes, 16 regs are plenty and do suffice for all "normal"[1] code. Assigning to wanted reg numbers for a function is a nice optimization.
[1] all except Dan's 6000 lines subroutines :) Did you start creating real subs for your code already?
leo