diff options
author | singhai <singhai@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-01 05:43:06 +0000 |
---|---|---|
committer | singhai <singhai@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-01 05:43:06 +0000 |
commit | 7bd765d4ede65c5e4895dfd9ea458b3f35b8483a (patch) | |
tree | 525ba5cb84f1f7d04874c56225d38fe09fea8455 /gcc/dumpfile.h | |
parent | 769bf18a20ee2540ca7601cdafabd62b18b9751b (diff) | |
download | gcc-7bd765d4ede65c5e4895dfd9ea458b3f35b8483a.tar.gz |
2012-09-30 Sharad Singhai <singhai@google.com>
* doc/invoke.texi: Add documentation for the new option.
* tree-dump.c: Move general dump file related functionality into
dumpfile.c. Remove unneeded headers.
* tree-dump.h: Move function declarations into dumpfile.h.
* dumpfile.h: Include "line-map.h". Add defines for MSG flags.
(struct dump_file_info): Move here from tree-dump.c. Rename flags
to pflags, state to pstate, stream to pstream, filename to
pfilename. All callers updated. Add alt_flags, alt_state,
alt_filenmae, alt_stream.
* tree-vectorizer.c: Include "dumpfile.h". Remove vect_dump.
(vect_set_dump_settings): Remove.
(vect_print_dump_info): Ditto.
* tree-vectorizer.h: Remove declaration of vect_dump and
vect_print_dump_info.
* tree-vect-loop.c: Include "dumpfile.h". Use new dump style.
* tree-vect-data-refs.c: Ditto.
* tree-vect-stmts.c: Ditto.
* tree-vect-slp.c: Ditto.
* tree-vect-patterns.c: Ditto.
* tree-vect-loop-manip.c: Ditto.
* testsuite/gcc.target/i386/vect-double-1.c: Fix test.
* opts.c (vect_set_verbosity_level): Remove.
(common_handle_option): Handle -fopt-info flag. Deprecate
-ftree-vectorizer-verbose.
* tree-parloops.c (gather_scalar_reductions): Remove reference to
vect_dump.
* flag-types.h: Remove vect_verbosity_levels.
* common.opt: Add -fopt-info. Deprecate -ftree-vectorizer-verbose.
* opts-global.c (dump_remap_tree_vectorizer_verbose): New
function.
(handle_common_deferred_options): Handle -fopt-info and
-ftree-vectorizer-verbose.
* Makefile.in: Add dumpfile.o.
(tree-dump.o): Update dependencies.
(tree-vect-loop.o): Ditto.
(tree-vect-loop-manip.o): Ditto.
(tree-vect-slp.o): Ditto.
(tree-vect-stmts.o): Ditto.
(tree-vectorizer.o): Ditto.
(opts.o): Ditto.
* passes.c (finish_optimization_passes): Instead of using
dump_begin/dump_end, use dump_start/dump_finish. Do not use dump_file.
(pass_init_dump_file): Ditto.
* c-decl.c (c_write_global_declarations): Use a different method
to determine if the dump has ben initialized.
* decl2.c (cp_write_global_declarations): Use a different method
to determine if the dump has ben initialized.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191883 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dumpfile.h')
-rw-r--r-- | gcc/dumpfile.h | 67 |
1 files changed, 50 insertions, 17 deletions
diff --git a/gcc/dumpfile.h b/gcc/dumpfile.h index 2ea3901b32e..cbaf47de422 100644 --- a/gcc/dumpfile.h +++ b/gcc/dumpfile.h @@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_DUMPFILE_H #define GCC_DUMPFILE_H 1 +#include "line-map.h" + /* Different tree dump places. When you add new tree dump places, extend the DUMP_FILES array in tree-dump.c. */ enum tree_dump_index @@ -43,9 +45,11 @@ enum tree_dump_index TDI_end }; -/* Bit masks to control dumping. Not all values are applicable to - all dumps. Add new ones at the end. When you define new - values, extend the DUMP_OPTIONS array in tree-dump.c */ +/* Bit masks to control dumping. Not all values are applicable to all + dumps. Add new ones at the end. When you define new values, extend + the DUMP_OPTIONS array in tree-dump.c. The TDF_* flags coexist with + MSG_* flags (for -fopt-info) and the bit values must be chosen + to allow that. */ #define TDF_ADDRESS (1 << 0) /* dump node addresses */ #define TDF_SLIM (1 << 1) /* don't go wild following links */ #define TDF_RAW (1 << 2) /* don't unparse the function */ @@ -82,18 +86,59 @@ enum tree_dump_index #define TDF_CSELIB (1 << 23) /* Dump cselib details. */ #define TDF_SCEV (1 << 24) /* Dump SCEV details. */ #define TDF_COMMENT (1 << 25) /* Dump lines with prefix ";;" */ +#define MSG_OPTIMIZED_LOCATIONS (1 << 26) /* -fopt-info optimized sources */ +#define MSG_MISSED_OPTIMIZATION (1 << 27) /* missed opportunities */ +#define MSG_NOTE (1 << 28) /* general optimization info */ +#define MSG_ALL (MSG_OPTIMIZED_LOCATIONS | MSG_MISSED_OPTIMIZATION \ + | MSG_NOTE) +/* Define a tree dump switch. */ +struct dump_file_info +{ + const char *suffix; /* suffix to give output file. */ + const char *swtch; /* command line dump switch */ + const char *glob; /* command line glob */ + const char *pfilename; /* filename for the pass-specific stream */ + const char *alt_filename; /* filename for the opt-info stream */ + FILE *pstream; /* pass-specific dump stream */ + FILE *alt_stream; /* opt-info stream */ + int pflags; /* dump flags */ + int alt_flags; /* flags for opt-info */ + int pstate; /* state of pass-specific stream */ + int alt_state; /* state of the opt-info stream */ + int num; /* dump file number */ +}; -/* In tree-dump.c */ +/* In dumpfile.c */ extern char *get_dump_file_name (int); -extern int dump_enabled_p (int); extern int dump_initialized_p (int); extern FILE *dump_begin (int, int *); extern void dump_end (int, FILE *); +extern int dump_start (int, int *); +extern void dump_finish (int); extern void dump_node (const_tree, int, FILE *); extern int dump_switch_p (const char *); +extern int opt_info_switch_p (const char *); extern const char *dump_flag_name (int); +extern bool dump_kind_p (int); +extern void dump_printf (int, const char *, ...) ATTRIBUTE_PRINTF_2; +extern void dump_printf_loc (int, source_location, + const char *, ...) ATTRIBUTE_PRINTF_3; +extern void dump_basic_block (int, basic_block, int); +extern void dump_generic_expr_loc (int, source_location, int, tree); +extern void dump_generic_expr (int, int, tree); +extern void dump_gimple_stmt_loc (int, source_location, int, gimple, int); +extern void dump_gimple_stmt (int, int, gimple, int); +extern void print_combine_total_stats (void); +extern unsigned int dump_register (const char *, const char *, const char *, + int); +extern bool enable_rtl_dump_file (void); + +/* In combine.c */ +extern void dump_combine_total_stats (FILE *); +/* In cfghooks.c */ +extern void dump_bb (FILE *, basic_block, int, int); /* Global variables used to communicate with passes. */ extern FILE *dump_file; @@ -103,16 +148,4 @@ extern const char *dump_file_name; /* Return the dump_file_info for the given phase. */ extern struct dump_file_info *get_dump_file_info (int); -/* Define a tree dump switch. */ -struct dump_file_info -{ - const char *suffix; /* suffix to give output file. */ - const char *swtch; /* command line switch */ - const char *glob; /* command line glob */ - int flags; /* user flags */ - int state; /* state of play */ - int num; /* dump file number */ -}; - - #endif /* GCC_DUMPFILE_H */ |