[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem
From: |
David A. Wheeler |
Subject: |
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it? |
Date: |
Tue, 08 May 2007 14:31:33 -0400 (EDT) |
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
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, (continued)
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Rob Landley, 2007/05/07
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Dave Dodge, 2007/05/08
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Fred Weigel, 2007/05/08
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Daniel Glöckner, 2007/05/08
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?,
David A. Wheeler <=
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Daniel Glöckner, 2007/05/08
- Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, David A. Wheeler, 2007/05/08
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Philippe Ribet, 2007/05/10
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, David A. Wheeler, 2007/05/10
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Rob Landley, 2007/05/11
Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?, Dave Dodge, 2007/05/08