re PR fortran/48448 (Implement -f(no-)frontend-optimization)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 8 Apr 2011 21:46:08 +0000 (21:46 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 8 Apr 2011 21:46:08 +0000 (21:46 +0000)
commit51a30b323dd59079cf039341d16e95c6136f31cb
treedead53cd1d4f1c204f3597d9701bfc77638335b5
parent041e059f264744313dc38f2223098409f8d86c29
re PR fortran/48448 (Implement -f(no-)frontend-optimization)

2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/48448
* gfortran.h (gfc_option_t):  Add warn_function_elimination and
flag_frontend_optimize.
* lang.opt (Wfunction-elimination):  Add.
(ffrontend-optimize):  Add.
* invoke.texi:  Add documentation for -Wfunction-elimination
and -ffrontend-optimize.  Add -faggressive-function-elimination
to list of code generation options.
* frontend-passes.c (gfc_run_passes):  Run optimizations if
flag_frontend_optimize is set.
(warn_function_elimination):  New function.
(cfe_expr_0):  Call it if requested to do so.
* options.c (gfc_init_options):  Initiate warn_function_elimination
and flag_frontend_optimize.
(gfc_post_options):  Set flag_frontend_optimize if not specified
by user, depending on the optimization level.
(gfc_handle_option):  Handle -Wfunction-elimination and
-ffrontend-optimize.

2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/48448
* gfortran.dg/function_optimize_5.f90:  New test.

From-SVN: r172215
gcc/fortran/ChangeLog
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_5.f90 [new file with mode: 0644]