[Top][All Lists]

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

[Tinycc-devel] Optimizing code for expressions

From: Mauro Persano
Subject: [Tinycc-devel] Optimizing code for expressions
Date: Tue, 8 Jul 2003 12:07:56 -0300 (BRT)


I'm wondering if there would be any interest in a modification
for tcc that would make it keep an expression in a tree in memory
before generating code. This could allow for some optimizations, 
such as better constant folding (tcc generates just two 
multiplications for '5 * 3 * foo', but its single-pass nature 
prevents it from optimizing 'foo * 5 * 3'), better register 
allocation, and maybe some common subexpression elimination.

I realize that tcc is (highly) optimized for compiler size and 
fast compile times, so a modification like this could be viewed as 
an attempt to steer it away from its original goals. I'm 
willing to try it, though. Any thoughts?



reply via email to

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