On Mon, Sep 23, 2013 at 05:05:35PM +0200, Vittorio Giovara wrote: > On Mon, Sep 23, 2013 at 3:45 PM, Thomas Preud'homme <[email protected]> wrote: >> Le lundi 23 septembre 2013 14:31:04 Vittorio Giovara a écrit : >>> >>> In my opinion, tinycc can remain without optimizations because it is >>> not one of the compiler design goals. >>> However there is one optimization that's more like a feature these >>> days: dead code elimination. >>> There are quite a few programs that completely rely on that and when >>> compiled with tcc plainly fail with a 'undefined symbol' error for >>> functions that are actually unused. >>> >>> It would be really nice to have some compiler switch (if not >>> integrated) that enable this functionality. >> >> Patches are welcome :) > > Umh, why not, can you give me a few pointers? > Never touched compiler code so in depth, I'll need some hand-holding ;)
Ok then, it means optimization passes are welcome (?) till patches are not too much intrusive on the internals. As I say in the other thread, why not having a "optimization" target to perform this pass and output C code with dead code eliminated? You would then feed this "dead code eliminated" C unit to tinycc again, but targetting your hardware. That should keep the optimization logic well confined in the target code, not spilling to much on the other internals. (I have as much experience as you on that matter) _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
