tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem


From: Rob Landley
Subject: Re: [Tinycc-devel] Proposal for handling alloca(). Anyone see a problem with it?
Date: Fri, 11 May 2007 19:39:40 -0400
User-agent: KMail/1.9.1

On Thursday 10 May 2007 8:01 pm, David A. Wheeler wrote:
> Philippe Ribet:
> > The initial goal of tcc is to be very fast and very small. Adding 
> > optimiser capabilities will make the code bigger, harder to understand 
> > and maintain, tcc runing slower... I think it will be another project.
> 
> It's a waste of time to work really hard at optimization in tcc,

Certainly not by default.  If we make it cleanly layered enough that people 
can plug something in, in a separate file, fine.  Dunno if that's possible 
and it's not something to worry about until it builds a working Linux kernel.

> but I think 
> that one _IS_ within the spirit of tcc, for two reasons: 
> * tcc _does_ include a number of optimizations, as long as they're "easy". 
> For example, it does constant folding.  I think this is another easy one. 

Dead code elimination and constant propogation are two others that compilers 
running under DOS in the 1980's managed to do.  Can't be _that_ hard...

> * Fabrice Bellard made sure that tcc could boot the Linux kernel. 

Technically he made it boot a modified subset the Linux kernel, but yeah.

> Unfortunately, that probably will fail, because the Linux kernel developers
> are moving to smaller (4K) stacks exclusively.  Adding an optimization that
> changes not-working to working, esp. a for program that tcc's developer
> SPECIFICALLY supported, makes sense.    

Perhaps we can have a "-O" flag.

> Usually optimizations just make programs a little faster.  This optimization
> may become necessary to run an important program, period. 

Dead code elimination is another one: BusyBox requires it.  (The config system 
uses it to remove code that's configured out.  Without it, calls get made to 
*.c files we don't compile and link in for a given configuration.)

Rob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]