[patch, fortran] Function call optimization
Thomas Koenig
tkoenig@netcologne.de
Wed Mar 16 21:25:00 GMT 2011
Am 15.03.2011 23:42, schrieb Mikael Morin:
> On second thought, maybe you're right; the speed-up / likeliness-to-break
> ratio doesn't look so interesting after all, and selecting only
> pure/implicitely pure functions for optimization would get rid of the weird
> cases without (hopefully) being too restrictive on the candidates for
> optimization.
Since this appears to be the consensus, here is an updated version of
the patch which does indeed that.
Regression-tested. OK for trunk?
2010-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/22572
* frontend_passes (expr_array): New static variable.
(expr_size): Likewise.
(expr_count): Likewise.
(current_code): Likewise.
(current_ns): Likewise.
(gfc_run_passes): Allocate and free space for expressions.
(compare_functions): New function.
(cfe_expr): New function.
(create_var): New function.
(cfc_expr_0): New function.
(cfe_code): New function.
(optimize_namespace): Invoke gfc_code_walker with cfe_code
and cfe_expr_0.
2010-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/22572
* gfortran.dg/function_optimize_1.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p9.diff
Type: text/x-patch
Size: 7578 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110316/0edf9b3d/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: function_optimize_1.f90
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110316/0edf9b3d/attachment.f90>
More information about the Gcc-patches
mailing list