aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authorSharad Singhai <singhai@google.com>2012-10-24 17:58:14 +0000
committerSharad Singhai <singhai@gcc.gnu.org>2012-10-24 17:58:14 +0000
commit73fbfcad22ae37dfd57a544aa0f5339b73bac439 (patch)
tree02a5de43f1e1e7c9de68e336f7b7bb4d2593dbf3 /gcc/dumpfile.c
parentc1a4d0b580e3c394d1ff9790fa581590aa7e953f (diff)
downloadgcc-73fbfcad22ae37dfd57a544aa0f5339b73bac439.zip
gcc-73fbfcad22ae37dfd57a544aa0f5339b73bac439.tar.gz
gcc-73fbfcad22ae37dfd57a544aa0f5339b73bac439.tar.bz2
dumpfile.c (dump_enabled_p): Make it inline and move the definition to dumpfile.h.
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. From-SVN: r192773
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r--gcc/dumpfile.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index 4ac427b..0f36afa 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