[patch, fortran] Introducing -fdump-optimized-tree
Thomas Koenig
tkoenig@netcologne.de
Sat Oct 30 13:59:00 GMT 2010
[Sorry if anybody sees this twice...]
Hi Tobias,
> >> fdump-fortran-xxx? Or perhaps have an umbrella fdump=...
> > fdump-fortran-original and fdump-fortran-optimized sounds good to me.
>
> Looks also fine to me.
Here's a patch which implements these options. Regression-tested,
also tested with "make info", "make dvi" and "make pdf".
OK for trunk?
2010-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.h (gfc_option_t): Replace dump_parse_tree by
dump_fortran_original and add dump_fortran_optimized.
* lang.opt: Add fdump-fortran-original and
fdump-fortran-optimized. Document that fdump-parse-tree is
deprecated.
* gfortran.texi: Add -fdump-fortran-original and
-fdump-fortran-optimized. -fdump-parse-tree is deprecated.
* frontend-passes.c (gfc_run_passes): If optimizing and
if gfc_option.dump_fortran_optimized is set, dump the parse tree
after optimization.
* parse.c: Rename gfc_option.dump_parse_tree to
gfc_option.dump_fortran_original.
* options.c (gfc_init_options): Rename gfc_option.dump_parse_tree
to gfc_option.dump_fortran_original and handle
gfc_option.dump_fortran_optimize.
(gfc_post_options): Rename gfc_option.dump_parse_tree
to gfc_option.dump_fortran_original.
(gfc_handle_option): Rename OPT_fdump_parse_tree to
OPT_fdump_fortran_original and gfc_option.dump_parse_tree
to gfc_option.dump_fortran_original. Handle
OPT_fdump_fortran_optimized.
> > Should we keep fdump-parse-tree around as an alias for 4.6, then remove
> > it for 4.7?
>
> Well, in principle one should really avoid removing flags; thus, we can
> deprecate it, but I am not sure that we should already remove it in 4.7.
> (On the other hand, -fdump-parse-tree is presumably extremely rarely
> used by users and also I hardly every use it - thus, it does not matter
> as much as removing -fbounds-check in favour of -fcheck=bounds would do.)
I think we can defer that decision until 4.7.
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump-2.diff
Type: text/x-patch
Size: 5275 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101030/c726cf87/attachment.bin>
More information about the Fortran
mailing list