Hi,
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?