[patch, fortran] Make frontend walker more general
Thomas Koenig
tkoenig@netcologne.de
Sat Sep 11 19:52:00 GMT 2010
Hello world,
the current expression walker for front end stuff is not general.
Here's an attempt to make it so. I have also added a few cases which
were not handled before.
Regression-tested. No test necessary, because this is only a cleanup.
OK for trunk?
Thomas
2010-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
* frontend-passes.c (process_functions): New struct and type.
(process_namespace): Rename from optimize_namespace, add
process_functions * argument. Call renamed functions.
Adjust prototype.
(process_code): Rename from optimize_code, add
process_functions * argument. Call renamed functions.
Adjust prototype.
(process_code_node): Rename from optimize_code_node, add
process_functions * argument. Call functions from the
pass function pointers. Add code for the EXEC_READ, EXEC_WRITE,
EXEC_OPEN, EXEC_INQUIRE, EXEC_REWIND, EXEC_ENDFILE,
EXEC_BACKSPACE, EXEC_CLOSE, EXEC_WAIT. Adjust prototype.
(optimize_expr_0): Return early for NULL expression.
(optimize_pass): New struct.
(gfc_run_passes): Call process namespace with optimize_pass
argument instead of optimize_namespace.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 11603 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100911/c7de3d7b/attachment.bin>
More information about the Fortran
mailing list