Daniel Glöckner:
> To save some stack space, we could do locSaved=loc
> when a new block is parsed and set locMin=min(loc,locSaved) at the end
> of the block. Then in the function epilog we patch the value of locMin
> into the prolog.

Reusing stack space from different sub-blocks would be nice.  It's probably not 
even that hard to make better use of stack space, though I haven't looked.

While apps generally have lots of stack space, the Linux kernel developers are 
moving (have moved?) to 4K blocks for kernel stacks.  Wasting stack space might 
be a real problem for a tcc-compiled Linux kernel.  (I don't think it's a 
problem wasting an extra word with alloca(), because those are rare calls 
anyway... but automatic variables and sub-blocks are EVERYWHERE.)

> Unfortunately this breaks ({int x=1; x;}).

Sorry, I don't understand that last sentence.

--- David A. Wheeler


_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to