diff options
author | singhai <singhai@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-24 17:58:14 +0000 |
---|---|---|
committer | singhai <singhai@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-24 17:58:14 +0000 |
commit | 6d8fb6cffe21050fb1a1a66eb990913e3555d27e (patch) | |
tree | 02a5de43f1e1e7c9de68e336f7b7bb4d2593dbf3 /gcc/dumpfile.c | |
parent | d7d9810428531cf359d949dad44cd94a2fbacbb3 (diff) | |
download | gcc-6d8fb6cffe21050fb1a1a66eb990913e3555d27e.tar.gz |
2012-10-24 Sharad Singhai <singhai@google.com>
* dumpfile.c (dump_enabled_p): Make it inline and move the definition
to dumpfile.h.
(dump_kind_p): Deleted. Functionality replaced by dump_enabled_p.
Make alt_dump_file extern.
* dumpfile.h (dump_enabled_p): Move inline definition here.
(dump_kind_p): Delete declaration.
Add extern declaration of alt_dump_file.
* toplev.c: Move dump_file and dump_file_name to dumpfile.c.
* tree-vect-loop-manip.c: Replace all uses of dump_kind_p with
dump_enabled_p.
* tree-vectorizer.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vect-slp.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r-- | gcc/dumpfile.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 4ac427b273a..0f36afae42a 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -32,12 +32,18 @@ along with GCC; see the file COPYING3. If not see static int pflags; /* current dump_flags */ static int alt_flags; /* current opt_info flags */ -static FILE *alt_dump_file = NULL; static void dump_loc (int, FILE *, source_location); static int dump_phase_enabled_p (int); static FILE *dump_open_alternate_stream (struct dump_file_info *); +/* These are currently used for communicating between passes. + However, instead of accessing them directly, the passes can use + dump_printf () for dumps. */ +FILE *dump_file = NULL; +FILE *alt_dump_file = NULL; +const char *dump_file_name; + /* Table of tree dump switches. This must be consistent with the TREE_DUMP_INDEX enumeration in dumpfile.h. */ static struct dump_file_info dump_files[TDI_end] = @@ -514,14 +520,6 @@ dump_phase_enabled_p (int phase) } } -/* Return true if any of the dumps are enabled, false otherwise. */ - -inline bool -dump_enabled_p (void) -{ - return (dump_file || alt_dump_file); -} - /* Returns nonzero if tree dump PHASE has been initialized. */ int @@ -836,16 +834,6 @@ opt_info_switch_p (const char *arg) return opt_info_enable_all ((TDF_TREE | TDF_RTL | TDF_IPA), flags, filename); } -/* Return true if any dumps are enabled for the given MSG_TYPE, false - otherwise. */ - -bool -dump_kind_p (int msg_type) -{ - return (dump_file && (msg_type & pflags)) - || (alt_dump_file && (msg_type & alt_flags)); -} - /* Print basic block on the dump streams. */ void |