r262220 - in /trunk/gcc: ChangeLog cgraph.c dum...

dmalcolm@gcc.gnu.org dmalcolm@gcc.gnu.org
Thu Jun 28 14:55:00 GMT 2018


Author: dmalcolm
Date: Thu Jun 28 14:55:42 2018
New Revision: 262220

URL: https://gcc.gnu.org/viewcvs?rev=262220&root=gcc&view=rev
Log:
Hide alt_dump_file within dumpfile.c

This patch removes alt_dump_file from dumpfile.h, making it static
within dumpfile.c.  This allows for changing how -fopt-info is
implemented, and potentially adding other kinds of dump target, such
as remarks or optimization records.

Doing so requires changing the implementation of dump_enabled_p, so
the patch changes this to a simple lookup of a boolean global, which
is updated any time dump_file or alt_dump_file change.

gcc/ChangeLog:
	* cgraph.c (cgraph_node::get_body): Replace assignments to
	"dump_file" with calls to set_dump_file.
	* dumpfile.c (alt_dump_file): Make static, and group with...
	(alt_flags): ...this definition.
	(dumps_are_enabled): New variable.
	(refresh_dumps_are_enabled): New function.
	(set_dump_file): New function.
	(set_alt_dump_file): New function.
	(gcc::dump_manager::dump_start): Replace assignments to
	"dump_file" and "alt_dump_file" with calls to set_dump_file and
	set_alt_dump_file.
	(gcc::dump_manager::dump_finish): Likewise.
	* dumpfile.h (alt_dump_file): Delete decl.
	(dumps_are_enabled): New variable decl.
	(set_dump_file): New function decl.
	(dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
	global.
	* tree-nested.c (lower_nested_functions): Replace assignments to
	"dump_file" with calls to set_dump_file.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraph.c
    trunk/gcc/dumpfile.c
    trunk/gcc/dumpfile.h
    trunk/gcc/tree-nested.c



More information about the Gcc-cvs mailing list