At 7:36 PM -0500 3/3/03, Benjamin Goldberg wrote:
Dan Sugalski wrote:
Benjamin Goldberg wrote:
Jason Gloudon wrote:
Piers Cawley wrote:

 I think you're overlooking the "restoreall" done just before
 the jump-no-save-returnaddress operation...  I see two "saveall"s
 and two "restoreall"s.

But with proper tail call optimization you'd only need *one* saveall. That's why it's an optimization.

Tail call optimization is a space (stack size) optimization. The scheme definition only requires space efficiency. The time optimization is important but a secondary consideration for the functional language folks.

Here's an idea -- considering that the first op of every sub seems to be a 'saveall' instruction,

If that's true, we need to thump IMCC some. There's no reason for this to be the first op--if the caller wanted any registers saved it had darned well beter have taken care of it itself. That's the point of caller-save, after all...

Erm, my statement was actually just an assumption that the first op would be a 'saveall' -- I haven't looked at actual imcc output. By your comment, I'll assume that my earlier assumption was wildly wrong.

Ben, please don't make assumptions. We've done this to death in the past, and it's all in the archives to go digging out. While there's plenty of useful metadata we can expose to imcc to get it better optimized output, the *last* thing we need is for someone to make a bunch of WAG and go off on the conversation based on them.
--
Dan


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

Reply via email to