tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Optimizing code for expressions


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] Optimizing code for expressions
Date: Tue, 08 Jul 2003 21:06:22 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408

Mauro Persano wrote:
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?

I would prefer a modification in which the program is transformed in an intermediate RISC like machine language. A first step would be to add a new target for TCC to generate this RISC like language, and then to write the converter to x86 code.

Fabrice.





reply via email to

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