Re: question - recycling GPR variables

Samuel Tardieu <[email protected]> 19 Nov 2004 22:21:30 +0100
Newsgroups gmane.comp.lang.forth.picforth
Organization Avian Carrier & Friends
Message-ID <[email protected]>
>>>>> "David" == David McNab <[email protected]> writes:

David> With other HLLs such as C, the compiler avoids a data stack
David> altogether, and allocates cells in absolute GPR locations
David> instead. It then uses heuristics to analyse the call tree and
David> recycle these GPRs wherever possible.

Interesting. Do they also properly handle interrupts? Is multitasking
supported then? Does that play well with dynamic calls?

David> Is there anything like this in PicForth? I'm trying to conserve
David> data memory, and would prefer not to have 9 GPRs permanently
David> allocated for just this one driver alone.

There is no such thing at this time. If you can come up with a clean
model, we may try to implement it.

If I do a compiler for the PIC18f, I think I'll do a full blown
register allocator, as the multiple FSR can be of some use
there.

  Sam
-- 
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/sam