re PR fortran/22572 (Double occurrence of matmul intrinsic not optimised)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 21 Mar 2011 07:14:42 +0000 (07:14 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 21 Mar 2011 07:14:42 +0000 (07:14 +0000)
commit2757d5ecfc14883087e062b169e8355f8cc74b19
treee7fa9989715e0c8733622fdf2e9e11eb709cdcb1
parent14a41392aab6bc963db2b4248b16aa2b5af09aa5
re PR fortran/22572 (Double occurrence of matmul intrinsic not optimised)

2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/22572
* gfortran.h (gfc_option_t) : Add
flag_aggressive_function_elimination.
(gfc_dep_compare_functions):  Add prototype.
* lang.opt: Add faggressive-function-elimination.
* invoke.texi: Document -faggressive-function-elimination.
* 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.
(cfe_register_funcs):  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.
* dependency.c (gfc_dep_compare_functions):  New function.
(gfc_dep_compare_expr):  Use it.
* options.c (gfc_init_options):  Handle
flag_aggressive_function_elimination.
(gfc_handle_option):  Likewise.

2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/22572
* gfortran.dg/function_optimize_1.f90:  New test.
* gfortran.dg/function_optimize_2.f90:  New test.

From-SVN: r171207
gcc/fortran/ChangeLog
gcc/fortran/dependency.c
gcc/fortran/frontend-passes.c
gcc/fortran/gfortran.h
gcc/fortran/invoke.texi
gcc/fortran/lang.opt
gcc/fortran/options.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/function_optimize_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/function_optimize_2.f90 [new file with mode: 0644]