-----Original Message----- From: Butler, Gerald Sent: Thursday, August 05, 2004 9:52 AM To: 'Dan Sugalski' Subject: RE: Spilling problems
I hate to intrude on this discussion, but, I was wondering if anyone could give a brief explanation (or point me to a resource) that explains what exactly is meant by "Register Spilling" and what the issues involved are.
My understanding is that this is a problem of trying to keep local variables of a sub/function in the Parrot registers without pushing/popping to/from a stack and/or saving/restoring to heap. Optimization includes doing code analysis to know when a particular local variable can be discarded, to free up the registers, because it is no longer needed, and also, what registers to swap out when another is needed such that you minimize swapping of values in registers.
Is my understanding at all correct?
Sorry for the neophyte question. I'm not that familiar with compiler issues such as this.
Thanks, Gerry Butler
-----Original Message----- From: Dan Sugalski [mailto:d...@sidhe.org] Sent: Thursday, August 05, 2004 9:44 AM To: Leopold Toetsch Cc: perl6-intern...@perl.org Subject: Re: Spilling problems
At 11:47 AM +0200 8/5/04, Leopold Toetsch wrote: >Dan Sugalski wrote: >>... In this case I'm hitting the double spill error, but this is, I >>expect, tied in with the infinite loop the register spiller hits on >>some code.
>Should be fixed now. Hopefully. - There were 2 bugs in the code WRT >calculating life range of spilled regs and the ordering of registers >was suboptimal.
It does indeed fix that problem. Cool, thanks. (I'm giving one of the nasty chunks of code I've got a test to see how it runs, but it may take a while to check)
>>It's probably a Leo or Melvin thing (unless anyone's see Angel Faus >>recently) to thump the register spilling code to have a fairly >>stupid fallback scheme (after X tries, or when we hit double spill) >>rather than trying to be optimal, but this one's going to need to >>get addressed.
>Spill just all in one pass?
Yeah. Give a dozen or two passes through the code doing optimized spilling, and after that just give up and spill what's left. -- Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai d...@sidhe.org have teddy bears and even teddy bears get drunk
The information contained in this e-mail message is privileged and/or confidential and is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by telephone (330-668-5000), and destroy the original message. Thank you.