C++ code generation: any way of deflating large expressions?
Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Mon Jul 21 23:58:48 CEST 2003
Dear Hugo,
On Thu, 10 Jul 2003 hugo_lec at club-internet.fr wrote:
[...]
> There's an algorithm to use the less temporary variables as possible (in order
> to help the compiler to optimize).
[...]
Could you please elaborate a little bit on that statement?
As it stands I find it slightly irritiating. Is this assessment based on
real experience? Given a compiler that transforms its parsed tree into
SSA form at some stage (as GCC 3.5 will), besides those phi-expressions
tons of temporaries are generated anyway in the IR. More or less by
definition, later optimizations must cope with and reduce them. So: is
there a point in trying to keep the number of temporaries low or is that
just fiction?
Maybe an example of the effect you are alluding at would be helpful.
Cheers
-richy.
--
Richard B. Kreckel
<Richard.Kreckel at GiNaC.DE>
<http://www.ginac.de/~kreckel/>
More information about the GiNaC-list
mailing list