[tree-ssa] tree-ssa vs. fold
Roger Sayle
roger@eyesopen.com
Sat Jun 7 02:03:00 GMT 2003
Hi Jeff,
> d) Fix fold() not to save_expr.
>
> Is d) the only real choice? Am I missing something easy?
Maybe. A very large number of optimizations in fold() use
save_expr (I committed one just this morning) and it would
probably be a significant performance hit to disable them all.
Even if this was just for java, there are a large number of
optimizations that you'd have to conditionalize.
However, one solution may be to provide a save_expr language
hook or equivalent. For tree-ssa/gimple, this would generate an
assignment to a temporary and insert the assignment immediately
before the current statement (recorded in a global perhaps), and
then return the temporary. For non-SSA, the hook would do as it
does at the moment.
There are a number of hooks or callbacks it would be nice for
fold to have, so that language front-ends such as java and ada
have some form of control over the optimizations/transformations
that it performs. Avoiding bit-field accesses when generating
.class files comes to mind.
Does a save_expr hook seem a reasonable compromise/workable?
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833
More information about the Gcc
mailing list