Introduce dump_flags_t type and use it instead of int type.

2017-05-17  Martin Liska  <mliska@suse.cz>

	* class.c (dump_class_hierarchy): Introduce dump_flags_t type and
	use it instead of int type.
	(dump_vtable): Likewise.
	(dump_vtt): Likewise.
	* decl2.c (dump_tu): Likewise.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* c-common.h: Introduce dump_flags_t type and
	use it instead of int type.
	* c-gimplify.c (c_genericize): Likewise.
	* c-opts.c: Likewise.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
	use it instead of int type.
2017-05-17  Martin Liska  <mliska@suse.cz>

	* cfg.c: Introduce dump_flags_t type and
	use it instead of int type.
	* cfg.h: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h (struct cfg_hooks): Likewise.
	* cfgrtl.c: Likewise.
	* cfgrtl.h: Likewise.
	* cgraph.c (cgraph_node::get_body): Likewise.
	* coretypes.h: Likewise.
	* domwalk.c: Likewise.
	* domwalk.h: Likewise.
	* dumpfile.c (struct dump_option_value_info): Likewise.
	(dump_enable_all): Likewise.
	(dump_switch_p_1): Likewise.
	(opt_info_switch_p): Likewise.
	* dumpfile.h (enum tree_dump_index): Likewise.
	(struct dump_file_info): Likewise.
	* genemit.c: Likewise.
	* generic-match-head.c: Likewise.
	* gengtype.c (open_base_files): Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-pretty-print.h: Likewise.
	* graph.c (print_graph_cfg): Likewise.
	* graphite-scop-detection.c (dot_all_sese): Likewise.
	* ipa-devirt.c (build_type_inheritance_graph): Likewise.
	* loop-unroll.c (report_unroll): Likewise.
	* passes.c (pass_manager::register_one_dump_file): Likewise.
	* print-tree.c: Likewise.
	* statistics.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfg.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dfa.h: Likewise.
	* tree-dump.c (dump_function): Likewise.
	* tree-dump.h (struct dump_info): Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-pretty-print.h: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-slp.c: Likewise.

From-SVN: r248140
This commit is contained in:
Martin Liska 2017-05-17 11:01:36 +02:00 committed by Martin Liska
parent b2fa0a8bdf
commit 1a81741814
47 changed files with 300 additions and 194 deletions

View File

@ -1,3 +1,48 @@
2017-05-17 Martin Liska <mliska@suse.cz>
* cfg.c: Introduce dump_flags_t type and
use it instead of int type.
* cfg.h: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h (struct cfg_hooks): Likewise.
* cfgrtl.c: Likewise.
* cfgrtl.h: Likewise.
* cgraph.c (cgraph_node::get_body): Likewise.
* coretypes.h: Likewise.
* domwalk.c: Likewise.
* domwalk.h: Likewise.
* dumpfile.c (struct dump_option_value_info): Likewise.
(dump_enable_all): Likewise.
(dump_switch_p_1): Likewise.
(opt_info_switch_p): Likewise.
* dumpfile.h (enum tree_dump_index): Likewise.
(struct dump_file_info): Likewise.
* genemit.c: Likewise.
* generic-match-head.c: Likewise.
* gengtype.c (open_base_files): Likewise.
* gimple-pretty-print.c: Likewise.
* gimple-pretty-print.h: Likewise.
* graph.c (print_graph_cfg): Likewise.
* graphite-scop-detection.c (dot_all_sese): Likewise.
* ipa-devirt.c (build_type_inheritance_graph): Likewise.
* loop-unroll.c (report_unroll): Likewise.
* passes.c (pass_manager::register_one_dump_file): Likewise.
* print-tree.c: Likewise.
* statistics.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfg.h: Likewise.
* tree-dfa.c: Likewise.
* tree-dfa.h: Likewise.
* tree-dump.c (dump_function): Likewise.
* tree-dump.h (struct dump_info): Likewise.
* tree-pretty-print.c: Likewise.
* tree-pretty-print.h: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-slp.c: Likewise.
2017-05-16 James Greenhalgh <james.greenhalgh@arm.com> 2017-05-16 James Greenhalgh <james.greenhalgh@arm.com>
Bill Schmidt <wschmidt@linux.vnet.ibm.com> Bill Schmidt <wschmidt@linux.vnet.ibm.com>

View File

@ -1,3 +1,10 @@
2017-05-17 Martin Liska <mliska@suse.cz>
* c-common.h: Introduce dump_flags_t type and
use it instead of int type.
* c-gimplify.c (c_genericize): Likewise.
* c-opts.c: Likewise.
2017-05-17 Marek Polacek <polacek@redhat.com> 2017-05-17 Marek Polacek <polacek@redhat.com>
* c-common.c (c_save_expr): Remove. * c-common.c (c_save_expr): Remove.

View File

@ -903,7 +903,7 @@ extern bool c_common_post_options (const char **);
extern bool c_common_init (void); extern bool c_common_init (void);
extern void c_common_finish (void); extern void c_common_finish (void);
extern void c_common_parse_file (void); extern void c_common_parse_file (void);
extern FILE *get_dump_info (int, int *); extern FILE *get_dump_info (int, dump_flags_t *);
extern alias_set_type c_common_get_alias_set (tree); extern alias_set_type c_common_get_alias_set (tree);
extern void c_register_builtin_type (tree, const char*); extern void c_register_builtin_type (tree, const char*);
extern bool c_promoting_integer_type_p (const_tree); extern bool c_promoting_integer_type_p (const_tree);

View File

@ -115,7 +115,7 @@ void
c_genericize (tree fndecl) c_genericize (tree fndecl)
{ {
FILE *dump_orig; FILE *dump_orig;
int local_dump_flags; dump_flags_t local_dump_flags;
struct cgraph_node *cgn; struct cgraph_node *cgn;
if (flag_sanitize & SANITIZE_BOUNDS) if (flag_sanitize & SANITIZE_BOUNDS)

View File

@ -101,9 +101,9 @@ static size_t include_cursor;
/* Dump files/flags to use during parsing. */ /* Dump files/flags to use during parsing. */
static FILE *original_dump_file = NULL; static FILE *original_dump_file = NULL;
static int original_dump_flags; static dump_flags_t original_dump_flags;
static FILE *class_dump_file = NULL; static FILE *class_dump_file = NULL;
static int class_dump_flags; static dump_flags_t class_dump_flags;
/* Whether any standard preincluded header has been preincluded. */ /* Whether any standard preincluded header has been preincluded. */
static bool done_preinclude; static bool done_preinclude;
@ -1136,7 +1136,7 @@ c_common_parse_file (void)
/* Returns the appropriate dump file for PHASE to dump with FLAGS. */ /* Returns the appropriate dump file for PHASE to dump with FLAGS. */
FILE * FILE *
get_dump_info (int phase, int *flags) get_dump_info (int phase, dump_flags_t *flags)
{ {
gcc_assert (phase == TDI_original || phase == TDI_class); gcc_assert (phase == TDI_original || phase == TDI_class);
if (phase == TDI_original) if (phase == TDI_original)

View File

@ -1,3 +1,8 @@
2017-05-17 Martin Liska <mliska@suse.cz>
* c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
use it instead of int type.
2017-05-17 Marek Polacek <polacek@redhat.com> 2017-05-17 Marek Polacek <polacek@redhat.com>
* c-convert.c (convert): Replace c_save_expr with save_expr. Don't * c-convert.c (convert): Replace c_save_expr with save_expr. Don't

View File

@ -11243,7 +11243,7 @@ c_parse_final_cleanups (void)
if (ext_block) if (ext_block)
{ {
tree tmp = BLOCK_VARS (ext_block); tree tmp = BLOCK_VARS (ext_block);
int flags; dump_flags_t flags;
FILE * stream = dump_begin (TDI_tu, &flags); FILE * stream = dump_begin (TDI_tu, &flags);
if (stream && tmp) if (stream && tmp)
{ {

View File

@ -396,7 +396,7 @@ clear_bb_flags (void)
It is still practical to have them reported for debugging of simple It is still practical to have them reported for debugging of simple
testcases. */ testcases. */
static void static void
check_bb_profile (basic_block bb, FILE * file, int indent, int flags) check_bb_profile (basic_block bb, FILE * file, int indent, dump_flags_t flags)
{ {
edge e; edge e;
int sum = 0; int sum = 0;
@ -474,7 +474,7 @@ check_bb_profile (basic_block bb, FILE * file, int indent, int flags)
} }
void void
dump_edge_info (FILE *file, edge e, int flags, int do_succ) dump_edge_info (FILE *file, edge e, dump_flags_t flags, int do_succ)
{ {
basic_block side = (do_succ ? e->dest : e->src); basic_block side = (do_succ ? e->dest : e->src);
bool do_details = false; bool do_details = false;
@ -713,7 +713,7 @@ debug_bb_n (int n)
that maybe_hot_bb_p and probably_never_executed_bb_p don't ICE. */ that maybe_hot_bb_p and probably_never_executed_bb_p don't ICE. */
void void
dump_bb_info (FILE *outf, basic_block bb, int indent, int flags, dump_bb_info (FILE *outf, basic_block bb, int indent, dump_flags_t flags,
bool do_header, bool do_footer) bool do_header, bool do_footer)
{ {
edge_iterator ei; edge_iterator ei;
@ -833,7 +833,7 @@ dump_bb_info (FILE *outf, basic_block bb, int indent, int flags,
/* Dumps a brief description of cfg to FILE. */ /* Dumps a brief description of cfg to FILE. */
void void
brief_dump_cfg (FILE *file, int flags) brief_dump_cfg (FILE *file, dump_flags_t flags)
{ {
basic_block bb; basic_block bb;

View File

@ -89,7 +89,7 @@ extern void remove_edge_raw (edge);
extern void redirect_edge_succ (edge, basic_block); extern void redirect_edge_succ (edge, basic_block);
extern void redirect_edge_pred (edge, basic_block); extern void redirect_edge_pred (edge, basic_block);
extern void clear_bb_flags (void); extern void clear_bb_flags (void);
extern void dump_edge_info (FILE *, edge, int, int); extern void dump_edge_info (FILE *, edge, dump_flags_t, int);
extern void debug (edge_def &ref); extern void debug (edge_def &ref);
extern void debug (edge_def *ptr); extern void debug (edge_def *ptr);
extern void alloc_aux_for_blocks (int); extern void alloc_aux_for_blocks (int);
@ -101,8 +101,8 @@ extern void clear_aux_for_edges (void);
extern void free_aux_for_edges (void); extern void free_aux_for_edges (void);
extern void debug_bb (basic_block); extern void debug_bb (basic_block);
extern basic_block debug_bb_n (int); extern basic_block debug_bb_n (int);
extern void dump_bb_info (FILE *, basic_block, int, int, bool, bool); extern void dump_bb_info (FILE *, basic_block, int, dump_flags_t, bool, bool);
extern void brief_dump_cfg (FILE *, int); extern void brief_dump_cfg (FILE *, dump_flags_t);
extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge); extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge);
extern void scale_bbs_frequencies_int (basic_block *, int, int, int); extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type, extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type,

View File

@ -269,7 +269,7 @@ verify_flow_info (void)
representation-specific information. */ representation-specific information. */
void void
dump_bb (FILE *outf, basic_block bb, int indent, int flags) dump_bb (FILE *outf, basic_block bb, int indent, dump_flags_t flags)
{ {
if (flags & TDF_BLOCKS) if (flags & TDF_BLOCKS)
dump_bb_info (outf, bb, indent, flags, true, false); dump_bb_info (outf, bb, indent, flags, true, false);
@ -319,7 +319,7 @@ dump_bb_for_graph (pretty_printer *pp, basic_block bb)
/* Dump the complete CFG to FILE. FLAGS are the TDF_* flags in dumpfile.h. */ /* Dump the complete CFG to FILE. FLAGS are the TDF_* flags in dumpfile.h. */
void void
dump_flow_info (FILE *file, int flags) dump_flow_info (FILE *file, dump_flags_t flags)
{ {
basic_block bb; basic_block bb;

View File

@ -62,7 +62,7 @@ struct cfg_hooks
/* Debugging. */ /* Debugging. */
int (*verify_flow_info) (void); int (*verify_flow_info) (void);
void (*dump_bb) (FILE *, basic_block, int, int); void (*dump_bb) (FILE *, basic_block, int, dump_flags_t);
void (*dump_bb_for_graph) (pretty_printer *, basic_block); void (*dump_bb_for_graph) (pretty_printer *, basic_block);
/* Basic CFG manipulation. */ /* Basic CFG manipulation. */
@ -198,9 +198,9 @@ checking_verify_flow_info (void)
verify_flow_info (); verify_flow_info ();
} }
extern void dump_bb (FILE *, basic_block, int, int); extern void dump_bb (FILE *, basic_block, int, dump_flags_t);
extern void dump_bb_for_graph (pretty_printer *, basic_block); extern void dump_bb_for_graph (pretty_printer *, basic_block);
extern void dump_flow_info (FILE *, int); extern void dump_flow_info (FILE *, dump_flags_t);
extern edge redirect_edge_and_branch (edge, basic_block); extern edge redirect_edge_and_branch (edge, basic_block);
extern basic_block redirect_edge_and_branch_force (edge, basic_block); extern basic_block redirect_edge_and_branch_force (edge, basic_block);

View File

@ -86,7 +86,7 @@ static void rtl_delete_block (basic_block);
static basic_block rtl_redirect_edge_and_branch_force (edge, basic_block); static basic_block rtl_redirect_edge_and_branch_force (edge, basic_block);
static edge rtl_redirect_edge_and_branch (edge, basic_block); static edge rtl_redirect_edge_and_branch (edge, basic_block);
static basic_block rtl_split_block (basic_block, void *); static basic_block rtl_split_block (basic_block, void *);
static void rtl_dump_bb (FILE *, basic_block, int, int); static void rtl_dump_bb (FILE *, basic_block, int, dump_flags_t);
static int rtl_verify_flow_info_1 (void); static int rtl_verify_flow_info_1 (void);
static void rtl_make_forwarder_block (edge); static void rtl_make_forwarder_block (edge);
@ -2112,7 +2112,7 @@ commit_edge_insertions (void)
documented in dumpfile.h. */ documented in dumpfile.h. */
static void static void
rtl_dump_bb (FILE *outf, basic_block bb, int indent, int flags) rtl_dump_bb (FILE *outf, basic_block bb, int indent, dump_flags_t flags)
{ {
rtx_insn *insn; rtx_insn *insn;
rtx_insn *last; rtx_insn *last;
@ -2155,7 +2155,7 @@ rtl_dump_bb (FILE *outf, basic_block bb, int indent, int flags)
in dumpfile.h. */ in dumpfile.h. */
void void
print_rtl_with_bb (FILE *outf, const rtx_insn *rtx_first, int flags) print_rtl_with_bb (FILE *outf, const rtx_insn *rtx_first, dump_flags_t flags)
{ {
const rtx_insn *tmp_rtx; const rtx_insn *tmp_rtx;
if (rtx_first == 0) if (rtx_first == 0)
@ -4242,7 +4242,7 @@ cfg_layout_duplicate_bb (basic_block bb)
FLAGS is a set of additional flags to pass to cleanup_cfg(). */ FLAGS is a set of additional flags to pass to cleanup_cfg(). */
void void
cfg_layout_initialize (unsigned int flags) cfg_layout_initialize (int flags)
{ {
rtx_insn_list *x; rtx_insn_list *x;
basic_block bb; basic_block bb;

View File

@ -40,7 +40,7 @@ extern basic_block force_nonfallthru_and_redirect (edge, basic_block, rtx);
extern void insert_insn_on_edge (rtx, edge); extern void insert_insn_on_edge (rtx, edge);
extern void commit_one_edge_insertion (edge e); extern void commit_one_edge_insertion (edge e);
extern void commit_edge_insertions (void); extern void commit_edge_insertions (void);
extern void print_rtl_with_bb (FILE *, const rtx_insn *, int); extern void print_rtl_with_bb (FILE *, const rtx_insn *, dump_flags_t);
extern void update_br_prob_note (basic_block); extern void update_br_prob_note (basic_block);
extern rtx_insn *get_last_bb_insn (basic_block); extern rtx_insn *get_last_bb_insn (basic_block);
extern void fixup_partitions (void); extern void fixup_partitions (void);
@ -50,7 +50,7 @@ extern bool fixup_abnormal_edges (void);
extern rtx_insn *unlink_insn_chain (rtx_insn *, rtx_insn *); extern rtx_insn *unlink_insn_chain (rtx_insn *, rtx_insn *);
extern void relink_block_chain (bool); extern void relink_block_chain (bool);
extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *); extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *);
extern void cfg_layout_initialize (unsigned int); extern void cfg_layout_initialize (int);
extern void cfg_layout_finalize (void); extern void cfg_layout_finalize (void);
extern void break_superblocks (void); extern void break_superblocks (void);
extern void init_rtl_bb_info (basic_block); extern void init_rtl_bb_info (basic_block);

View File

@ -3652,7 +3652,7 @@ cgraph_node::get_body (void)
opt_pass *saved_current_pass = current_pass; opt_pass *saved_current_pass = current_pass;
FILE *saved_dump_file = dump_file; FILE *saved_dump_file = dump_file;
const char *saved_dump_file_name = dump_file_name; const char *saved_dump_file_name = dump_file_name;
int saved_dump_flags = dump_flags; dump_flags_t saved_dump_flags = dump_flags;
dump_file_name = NULL; dump_file_name = NULL;
dump_file = NULL; dump_file = NULL;

View File

@ -371,6 +371,7 @@ typedef unsigned char uchar;
#include "input.h" #include "input.h"
#include "is-a.h" #include "is-a.h"
#include "memory-block.h" #include "memory-block.h"
#include "dumpfile.h"
#endif /* GENERATOR_FILE && !USED_FOR_TARGET */ #endif /* GENERATOR_FILE && !USED_FOR_TARGET */
#endif /* coretypes.h */ #endif /* coretypes.h */

View File

@ -1,3 +1,11 @@
2017-05-17 Martin Liska <mliska@suse.cz>
* class.c (dump_class_hierarchy): Introduce dump_flags_t type and
use it instead of int type.
(dump_vtable): Likewise.
(dump_vtt): Likewise.
* decl2.c (dump_tu): Likewise.
2017-05-16 David Malcolm <dmalcolm@redhat.com> 2017-05-16 David Malcolm <dmalcolm@redhat.com>
* call.c (enforce_access): Add access_failure_info * param and use * call.c (enforce_access): Add access_failure_info * param and use

View File

@ -172,9 +172,9 @@ static tree find_final_overrider (tree, tree, tree);
static int make_new_vtable (tree, tree); static int make_new_vtable (tree, tree);
static tree get_primary_binfo (tree); static tree get_primary_binfo (tree);
static int maybe_indent_hierarchy (FILE *, int, int); static int maybe_indent_hierarchy (FILE *, int, int);
static tree dump_class_hierarchy_r (FILE *, int, tree, tree, int); static tree dump_class_hierarchy_r (FILE *, dump_flags_t, tree, tree, int);
static void dump_class_hierarchy (tree); static void dump_class_hierarchy (tree);
static void dump_class_hierarchy_1 (FILE *, int, tree); static void dump_class_hierarchy_1 (FILE *, dump_flags_t, tree);
static void dump_array (FILE *, tree); static void dump_array (FILE *, tree);
static void dump_vtable (tree, tree, tree); static void dump_vtable (tree, tree, tree);
static void dump_vtt (tree, tree); static void dump_vtt (tree, tree);
@ -8823,7 +8823,7 @@ maybe_indent_hierarchy (FILE * stream, int indent, int indented_p)
static tree static tree
dump_class_hierarchy_r (FILE *stream, dump_class_hierarchy_r (FILE *stream,
int flags, dump_flags_t flags,
tree binfo, tree binfo,
tree igo, tree igo,
int indent) int indent)
@ -8916,7 +8916,7 @@ dump_class_hierarchy_r (FILE *stream,
/* Dump the BINFO hierarchy for T. */ /* Dump the BINFO hierarchy for T. */
static void static void
dump_class_hierarchy_1 (FILE *stream, int flags, tree t) dump_class_hierarchy_1 (FILE *stream, dump_flags_t flags, tree t)
{ {
fprintf (stream, "Class %s\n", type_as_string (t, TFF_PLAIN_IDENTIFIER)); fprintf (stream, "Class %s\n", type_as_string (t, TFF_PLAIN_IDENTIFIER));
fprintf (stream, " size=%lu align=%lu\n", fprintf (stream, " size=%lu align=%lu\n",
@ -8942,7 +8942,7 @@ debug_class (tree t)
static void static void
dump_class_hierarchy (tree t) dump_class_hierarchy (tree t)
{ {
int flags; dump_flags_t flags;
FILE *stream = get_dump_info (TDI_class, &flags); FILE *stream = get_dump_info (TDI_class, &flags);
if (stream) if (stream)
@ -8976,7 +8976,7 @@ dump_array (FILE * stream, tree decl)
static void static void
dump_vtable (tree t, tree binfo, tree vtable) dump_vtable (tree t, tree binfo, tree vtable)
{ {
int flags; dump_flags_t flags;
FILE *stream = get_dump_info (TDI_class, &flags); FILE *stream = get_dump_info (TDI_class, &flags);
if (!stream) if (!stream)
@ -9005,7 +9005,7 @@ dump_vtable (tree t, tree binfo, tree vtable)
static void static void
dump_vtt (tree t, tree vtt) dump_vtt (tree t, tree vtt)
{ {
int flags; dump_flags_t flags;
FILE *stream = get_dump_info (TDI_class, &flags); FILE *stream = get_dump_info (TDI_class, &flags);
if (!stream) if (!stream)

View File

@ -4361,7 +4361,7 @@ generate_mangling_aliases ()
static void static void
dump_tu (void) dump_tu (void)
{ {
int flags; dump_flags_t flags;
FILE *stream = dump_begin (TDI_tu, &flags); FILE *stream = dump_begin (TDI_tu, &flags);
if (stream) if (stream)

View File

@ -201,7 +201,7 @@ dom_walker::bb_reachable (struct function *fun, basic_block bb)
void void
dom_walker::propagate_unreachable_to_edges (basic_block bb, dom_walker::propagate_unreachable_to_edges (basic_block bb,
FILE *dump_file, FILE *dump_file,
int dump_flags) dump_flags_t dump_flags)
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Marking all outgoing edges of unreachable " fprintf (dump_file, "Marking all outgoing edges of unreachable "

View File

@ -70,7 +70,7 @@ private:
and possibly incoming edges for the block. Typically called after and possibly incoming edges for the block. Typically called after
determining a block is unreachable in the before_dom_children determining a block is unreachable in the before_dom_children
callback. */ callback. */
void propagate_unreachable_to_edges (basic_block, FILE *, int); void propagate_unreachable_to_edges (basic_block, FILE *, dump_flags_t);
}; };

View File

@ -33,10 +33,10 @@ along with GCC; see the file COPYING3. If not see
#define skip_leading_substring(whole, part) \ #define skip_leading_substring(whole, part) \
(strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part)) (strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
static int pflags; /* current dump_flags */ static dump_flags_t pflags; /* current dump_flags */
static int alt_flags; /* current opt_info flags */ static dump_flags_t alt_flags; /* current opt_info flags */
static void dump_loc (int, FILE *, source_location); static void dump_loc (dump_flags_t, FILE *, source_location);
static FILE *dump_open_alternate_stream (struct dump_file_info *); static FILE *dump_open_alternate_stream (struct dump_file_info *);
/* These are currently used for communicating between passes. /* These are currently used for communicating between passes.
@ -45,7 +45,7 @@ static FILE *dump_open_alternate_stream (struct dump_file_info *);
FILE *dump_file = NULL; FILE *dump_file = NULL;
FILE *alt_dump_file = NULL; FILE *alt_dump_file = NULL;
const char *dump_file_name; const char *dump_file_name;
int dump_flags; dump_flags_t dump_flags;
/* Table of tree dump switches. This must be consistent with the /* Table of tree dump switches. This must be consistent with the
TREE_DUMP_INDEX enumeration in dumpfile.h. */ TREE_DUMP_INDEX enumeration in dumpfile.h. */
@ -84,7 +84,7 @@ static struct dump_file_info dump_files[TDI_end] =
struct dump_option_value_info struct dump_option_value_info
{ {
const char *const name; /* the name of the value */ const char *const name; /* the name of the value */
const int value; /* the value of the name */ const dump_flags_t value; /* the value of the name */
}; };
/* Table of dump options. This must be consistent with the TDF_* flags /* Table of dump options. This must be consistent with the TDF_* flags
@ -181,7 +181,7 @@ gcc::dump_manager::~dump_manager ()
unsigned int unsigned int
gcc::dump_manager:: gcc::dump_manager::
dump_register (const char *suffix, const char *swtch, const char *glob, dump_register (const char *suffix, const char *swtch, const char *glob,
int flags, int optgroup_flags, dump_flags_t flags, int optgroup_flags,
bool take_ownership) bool take_ownership)
{ {
int num = m_next_dump++; int num = m_next_dump++;
@ -327,7 +327,7 @@ dump_open_alternate_stream (struct dump_file_info *dfi)
/* Print source location on DFILE if enabled. */ /* Print source location on DFILE if enabled. */
void void
dump_loc (int dump_kind, FILE *dfile, source_location loc) dump_loc (dump_flags_t dump_kind, FILE *dfile, source_location loc)
{ {
if (dump_kind) if (dump_kind)
{ {
@ -346,7 +346,8 @@ dump_loc (int dump_kind, FILE *dfile, source_location loc)
EXTRA_DUMP_FLAGS on the dump streams if DUMP_KIND is enabled. */ EXTRA_DUMP_FLAGS on the dump streams if DUMP_KIND is enabled. */
void void
dump_gimple_stmt (int dump_kind, int extra_dump_flags, gimple *gs, int spc) dump_gimple_stmt (dump_flags_t dump_kind, dump_flags_t extra_dump_flags,
gimple *gs, int spc)
{ {
if (dump_file && (dump_kind & pflags)) if (dump_file && (dump_kind & pflags))
print_gimple_stmt (dump_file, gs, spc, dump_flags | extra_dump_flags); print_gimple_stmt (dump_file, gs, spc, dump_flags | extra_dump_flags);
@ -358,8 +359,8 @@ dump_gimple_stmt (int dump_kind, int extra_dump_flags, gimple *gs, int spc)
/* Similar to dump_gimple_stmt, except additionally print source location. */ /* Similar to dump_gimple_stmt, except additionally print source location. */
void void
dump_gimple_stmt_loc (int dump_kind, source_location loc, int extra_dump_flags, dump_gimple_stmt_loc (dump_flags_t dump_kind, source_location loc,
gimple *gs, int spc) dump_flags_t extra_dump_flags, gimple *gs, int spc)
{ {
if (dump_file && (dump_kind & pflags)) if (dump_file && (dump_kind & pflags))
{ {
@ -378,7 +379,8 @@ dump_gimple_stmt_loc (int dump_kind, source_location loc, int extra_dump_flags,
DUMP_KIND is enabled. */ DUMP_KIND is enabled. */
void void
dump_generic_expr (int dump_kind, int extra_dump_flags, tree t) dump_generic_expr (dump_flags_t dump_kind, dump_flags_t extra_dump_flags,
tree t)
{ {
if (dump_file && (dump_kind & pflags)) if (dump_file && (dump_kind & pflags))
print_generic_expr (dump_file, t, dump_flags | extra_dump_flags); print_generic_expr (dump_file, t, dump_flags | extra_dump_flags);
@ -393,7 +395,7 @@ dump_generic_expr (int dump_kind, int extra_dump_flags, tree t)
void void
dump_generic_expr_loc (int dump_kind, source_location loc, dump_generic_expr_loc (int dump_kind, source_location loc,
int extra_dump_flags, tree t) dump_flags_t extra_dump_flags, tree t)
{ {
if (dump_file && (dump_kind & pflags)) if (dump_file && (dump_kind & pflags))
{ {
@ -411,7 +413,7 @@ dump_generic_expr_loc (int dump_kind, source_location loc,
/* Output a formatted message using FORMAT on appropriate dump streams. */ /* Output a formatted message using FORMAT on appropriate dump streams. */
void void
dump_printf (int dump_kind, const char *format, ...) dump_printf (dump_flags_t dump_kind, const char *format, ...)
{ {
if (dump_file && (dump_kind & pflags)) if (dump_file && (dump_kind & pflags))
{ {
@ -433,7 +435,8 @@ dump_printf (int dump_kind, const char *format, ...)
/* Similar to dump_printf, except source location is also printed. */ /* Similar to dump_printf, except source location is also printed. */
void void
dump_printf_loc (int dump_kind, source_location loc, const char *format, ...) dump_printf_loc (dump_flags_t dump_kind, source_location loc,
const char *format, ...)
{ {
if (dump_file && (dump_kind & pflags)) if (dump_file && (dump_kind & pflags))
{ {
@ -462,7 +465,7 @@ dump_printf_loc (int dump_kind, source_location loc, const char *format, ...)
int int
gcc::dump_manager:: gcc::dump_manager::
dump_start (int phase, int *flag_ptr) dump_start (int phase, dump_flags_t *flag_ptr)
{ {
int count = 0; int count = 0;
char *name; char *name;
@ -546,14 +549,14 @@ dump_finish (int phase)
Multiple calls will reopen and append to the dump file. */ Multiple calls will reopen and append to the dump file. */
FILE * FILE *
dump_begin (int phase, int *flag_ptr) dump_begin (int phase, dump_flags_t *flag_ptr)
{ {
return g->get_dumps ()->dump_begin (phase, flag_ptr); return g->get_dumps ()->dump_begin (phase, flag_ptr);
} }
FILE * FILE *
gcc::dump_manager:: gcc::dump_manager::
dump_begin (int phase, int *flag_ptr) dump_begin (int phase, dump_flags_t *flag_ptr)
{ {
char *name; char *name;
struct dump_file_info *dfi; struct dump_file_info *dfi;
@ -654,9 +657,9 @@ dump_end (int phase ATTRIBUTE_UNUSED, FILE *stream)
int int
gcc::dump_manager:: gcc::dump_manager::
dump_enable_all (int flags, const char *filename) dump_enable_all (dump_flags_t flags, const char *filename)
{ {
int ir_dump_type = TDF_KIND (flags); dump_flags_t ir_dump_type = TDF_KIND (flags);
int n = 0; int n = 0;
size_t i; size_t i;
@ -711,7 +714,8 @@ dump_enable_all (int flags, const char *filename)
int int
gcc::dump_manager:: gcc::dump_manager::
opt_info_enable_passes (int optgroup_flags, int flags, const char *filename) opt_info_enable_passes (int optgroup_flags, dump_flags_t flags,
const char *filename)
{ {
int n = 0; int n = 0;
size_t i; size_t i;
@ -764,7 +768,7 @@ dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob)
{ {
const char *option_value; const char *option_value;
const char *ptr; const char *ptr;
int flags; dump_flags_t flags;
if (doglob && !dfi->glob) if (doglob && !dfi->glob)
return 0; return 0;
@ -863,7 +867,7 @@ dump_switch_p (const char *arg)
and filename. Return non-zero if it is a recognized switch. */ and filename. Return non-zero if it is a recognized switch. */
static int static int
opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags, opt_info_switch_p_1 (const char *arg, dump_flags_t *flags, int *optgroup_flags,
char **filename) char **filename)
{ {
const char *option_value; const char *option_value;
@ -941,7 +945,7 @@ opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags,
int int
opt_info_switch_p (const char *arg) opt_info_switch_p (const char *arg)
{ {
int flags; dump_flags_t flags;
int optgroup_flags; int optgroup_flags;
char *filename; char *filename;
static char *file_seen = NULL; static char *file_seen = NULL;
@ -987,7 +991,7 @@ void
dump_function (int phase, tree fn) dump_function (int phase, tree fn)
{ {
FILE *stream; FILE *stream;
int flags; dump_flags_t flags;
stream = dump_begin (phase, &flags); stream = dump_begin (phase, &flags);
if (stream) if (stream)

View File

@ -99,6 +99,10 @@ enum tree_dump_index
| MSG_NOTE) | MSG_NOTE)
/* Value of TDF_NONE is used just for bits filtered by TDF_KIND_MASK. */
#define TDF_NONE 0
/* Flags to control high-level -fopt-info dumps. Usually these flags /* Flags to control high-level -fopt-info dumps. Usually these flags
define a group of passes. An optimization pass can be part of define a group of passes. An optimization pass can be part of
multiple groups. */ multiple groups. */
@ -113,6 +117,10 @@ enum tree_dump_index
#define OPTGROUP_ALL (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \ #define OPTGROUP_ALL (OPTGROUP_IPA | OPTGROUP_LOOP | OPTGROUP_INLINE \
| OPTGROUP_OMP | OPTGROUP_VEC | OPTGROUP_OTHER) | OPTGROUP_OMP | OPTGROUP_VEC | OPTGROUP_OTHER)
/* Dump flags type. */
typedef uint64_t dump_flags_t;
/* Define a tree dump switch. */ /* Define a tree dump switch. */
struct dump_file_info struct dump_file_info
{ {
@ -123,7 +131,7 @@ struct dump_file_info
const char *alt_filename; /* filename for the -fopt-info stream */ const char *alt_filename; /* filename for the -fopt-info stream */
FILE *pstream; /* pass-specific dump stream */ FILE *pstream; /* pass-specific dump stream */
FILE *alt_stream; /* -fopt-info stream */ FILE *alt_stream; /* -fopt-info stream */
int pflags; /* dump flags */ dump_flags_t pflags; /* dump flags */
int optgroup_flags; /* optgroup flags for -fopt-info */ int optgroup_flags; /* optgroup flags for -fopt-info */
int alt_flags; /* flags for opt-info */ int alt_flags; /* flags for opt-info */
int pstate; /* state of pass-specific stream */ int pstate; /* state of pass-specific stream */
@ -140,34 +148,35 @@ struct dump_file_info
}; };
/* In dumpfile.c */ /* In dumpfile.c */
extern FILE *dump_begin (int, int *); extern FILE *dump_begin (int, dump_flags_t *);
extern void dump_end (int, FILE *); extern void dump_end (int, FILE *);
extern int opt_info_switch_p (const char *); extern int opt_info_switch_p (const char *);
extern const char *dump_flag_name (int); extern const char *dump_flag_name (int);
extern void dump_printf (int, const char *, ...) ATTRIBUTE_PRINTF_2; extern void dump_printf (dump_flags_t, const char *, ...) ATTRIBUTE_PRINTF_2;
extern void dump_printf_loc (int, source_location, extern void dump_printf_loc (dump_flags_t, source_location,
const char *, ...) ATTRIBUTE_PRINTF_3; const char *, ...) ATTRIBUTE_PRINTF_3;
extern void dump_function (int phase, tree fn); extern void dump_function (int phase, tree fn);
extern void dump_basic_block (int, basic_block, int); 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_loc (int, source_location, int, tree);
extern void dump_generic_expr (int, int, tree); extern void dump_generic_expr (dump_flags_t, dump_flags_t, tree);
extern void dump_gimple_stmt_loc (int, source_location, int, gimple *, int); extern void dump_gimple_stmt_loc (dump_flags_t, source_location, dump_flags_t,
extern void dump_gimple_stmt (int, int, gimple *, int); gimple *, int);
extern void dump_gimple_stmt (dump_flags_t, dump_flags_t, gimple *, int);
extern void print_combine_total_stats (void); extern void print_combine_total_stats (void);
extern bool enable_rtl_dump_file (void); extern bool enable_rtl_dump_file (void);
/* In tree-dump.c */ /* In tree-dump.c */
extern void dump_node (const_tree, int, FILE *); extern void dump_node (const_tree, dump_flags_t, FILE *);
/* In combine.c */ /* In combine.c */
extern void dump_combine_total_stats (FILE *); extern void dump_combine_total_stats (FILE *);
/* In cfghooks.c */ /* In cfghooks.c */
extern void dump_bb (FILE *, basic_block, int, int); extern void dump_bb (FILE *, basic_block, int, dump_flags_t);
/* Global variables used to communicate with passes. */ /* Global variables used to communicate with passes. */
extern FILE *dump_file; extern FILE *dump_file;
extern FILE *alt_dump_file; extern FILE *alt_dump_file;
extern int dump_flags; extern dump_flags_t dump_flags;
extern const char *dump_file_name; extern const char *dump_file_name;
/* Return true if any of the dumps is enabled, false otherwise. */ /* Return true if any of the dumps is enabled, false otherwise. */
@ -192,7 +201,7 @@ public:
SUFFIX, SWTCH, and GLOB. */ SUFFIX, SWTCH, and GLOB. */
unsigned int unsigned int
dump_register (const char *suffix, const char *swtch, const char *glob, dump_register (const char *suffix, const char *swtch, const char *glob,
int flags, int optgroup_flags, dump_flags_t flags, int optgroup_flags,
bool take_ownership); bool take_ownership);
/* Return the dump_file_info for the given phase. */ /* Return the dump_file_info for the given phase. */
@ -219,7 +228,7 @@ public:
set dump_flags appropriately for both pass dump stream and set dump_flags appropriately for both pass dump stream and
-fopt-info stream. */ -fopt-info stream. */
int int
dump_start (int phase, int *flag_ptr); dump_start (int phase, dump_flags_t *flag_ptr);
/* Finish a tree dump for PHASE and close associated dump streams. Also /* Finish a tree dump for PHASE and close associated dump streams. Also
reset the globals DUMP_FILE, ALT_DUMP_FILE, and DUMP_FLAGS. */ reset the globals DUMP_FILE, ALT_DUMP_FILE, and DUMP_FLAGS. */
@ -227,7 +236,7 @@ public:
dump_finish (int phase); dump_finish (int phase);
FILE * FILE *
dump_begin (int phase, int *flag_ptr); dump_begin (int phase, dump_flags_t *flag_ptr);
/* Returns nonzero if tree dump PHASE has been initialized. */ /* Returns nonzero if tree dump PHASE has been initialized. */
int int
@ -246,10 +255,11 @@ private:
dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob); dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob);
int int
dump_enable_all (int flags, const char *filename); dump_enable_all (dump_flags_t flags, const char *filename);
int int
opt_info_enable_passes (int optgroup_flags, int flags, const char *filename); opt_info_enable_passes (int optgroup_flags, dump_flags_t flags,
const char *filename);
private: private:

View File

@ -797,7 +797,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"regs.h\"\n"); printf ("#include \"regs.h\"\n");
printf ("#include \"tm-constrs.h\"\n"); printf ("#include \"tm-constrs.h\"\n");
printf ("#include \"ggc.h\"\n"); printf ("#include \"ggc.h\"\n");
printf ("#include \"dumpfile.h\"\n");
printf ("#include \"target.h\"\n\n"); printf ("#include \"target.h\"\n\n");
/* Read the machine description. */ /* Read the machine description. */

View File

@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "stor-layout.h" #include "stor-layout.h"
#include "tree-dfa.h" #include "tree-dfa.h"
#include "builtins.h" #include "builtins.h"
#include "dumpfile.h"
#include "case-cfn-macros.h" #include "case-cfn-macros.h"
#include "gimplify.h" #include "gimplify.h"

View File

@ -1706,7 +1706,8 @@ open_base_files (void)
{ {
/* The order of files here matters very much. */ /* The order of files here matters very much. */
static const char *const ifiles[] = { static const char *const ifiles[] = {
"config.h", "system.h", "coretypes.h", "backend.h", "predict.h", "tree.h", "config.h", "system.h", "coretypes.h",
"backend.h", "predict.h", "tree.h",
"rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h", "rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h",
"alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h", "alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h",
"explow.h", "calls.h", "cilk.h", "memmodel.h", "emit-rtl.h", "varasm.h", "explow.h", "calls.h", "cilk.h", "memmodel.h", "emit-rtl.h", "varasm.h",

View File

@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "dumpfile.h"
#include "backend.h" #include "backend.h"
#include "tree.h" #include "tree.h"
#include "gimple.h" #include "gimple.h"
@ -108,7 +109,7 @@ dump_edge_probability (pretty_printer *buffer, edge e)
FLAGS as in pp_gimple_stmt_1. */ FLAGS as in pp_gimple_stmt_1. */
void void
print_gimple_stmt (FILE *file, gimple *g, int spc, int flags) print_gimple_stmt (FILE *file, gimple *g, int spc, dump_flags_t flags)
{ {
pretty_printer buffer; pretty_printer buffer;
pp_needs_newline (&buffer) = true; pp_needs_newline (&buffer) = true;
@ -138,7 +139,7 @@ debug (gimple *ptr)
of the statement. */ of the statement. */
void void
print_gimple_expr (FILE *file, gimple *g, int spc, int flags) print_gimple_expr (FILE *file, gimple *g, int spc, dump_flags_t flags)
{ {
flags |= TDF_RHS_ONLY; flags |= TDF_RHS_ONLY;
pretty_printer buffer; pretty_printer buffer;
@ -155,7 +156,8 @@ print_gimple_expr (FILE *file, gimple *g, int spc, int flags)
the pretty printer. */ the pretty printer. */
static void static void
dump_gimple_seq (pretty_printer *buffer, gimple_seq seq, int spc, int flags) dump_gimple_seq (pretty_printer *buffer, gimple_seq seq, int spc,
dump_flags_t flags)
{ {
gimple_stmt_iterator i; gimple_stmt_iterator i;
@ -174,7 +176,7 @@ dump_gimple_seq (pretty_printer *buffer, gimple_seq seq, int spc, int flags)
FLAGS as in pp_gimple_stmt_1. */ FLAGS as in pp_gimple_stmt_1. */
void void
print_gimple_seq (FILE *file, gimple_seq seq, int spc, int flags) print_gimple_seq (FILE *file, gimple_seq seq, int spc, dump_flags_t flags)
{ {
pretty_printer buffer; pretty_printer buffer;
pp_needs_newline (&buffer) = true; pp_needs_newline (&buffer) = true;
@ -206,7 +208,7 @@ debug_gimple_seq (gimple_seq seq)
'-' - decreases indent by 2 then outputs a newline. */ '-' - decreases indent by 2 then outputs a newline. */
static void static void
dump_gimple_fmt (pretty_printer *buffer, int spc, int flags, dump_gimple_fmt (pretty_printer *buffer, int spc, dump_flags_t flags,
const char *fmt, ...) const char *fmt, ...)
{ {
va_list args; va_list args;
@ -285,7 +287,8 @@ dump_gimple_fmt (pretty_printer *buffer, int spc, int flags,
assignment GS. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. */ assignment GS. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. */
static void static void
dump_unary_rhs (pretty_printer *buffer, gassign *gs, int spc, int flags) dump_unary_rhs (pretty_printer *buffer, gassign *gs, int spc,
dump_flags_t flags)
{ {
enum tree_code rhs_code = gimple_assign_rhs_code (gs); enum tree_code rhs_code = gimple_assign_rhs_code (gs);
tree lhs = gimple_assign_lhs (gs); tree lhs = gimple_assign_lhs (gs);
@ -377,7 +380,8 @@ dump_unary_rhs (pretty_printer *buffer, gassign *gs, int spc, int flags)
assignment GS. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. */ assignment GS. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. */
static void static void
dump_binary_rhs (pretty_printer *buffer, gassign *gs, int spc, int flags) dump_binary_rhs (pretty_printer *buffer, gassign *gs, int spc,
dump_flags_t flags)
{ {
const char *p; const char *p;
enum tree_code code = gimple_assign_rhs_code (gs); enum tree_code code = gimple_assign_rhs_code (gs);
@ -433,7 +437,8 @@ dump_binary_rhs (pretty_printer *buffer, gassign *gs, int spc, int flags)
assignment GS. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. */ assignment GS. BUFFER, SPC and FLAGS are as in pp_gimple_stmt_1. */
static void static void
dump_ternary_rhs (pretty_printer *buffer, gassign *gs, int spc, int flags) dump_ternary_rhs (pretty_printer *buffer, gassign *gs, int spc,
dump_flags_t flags)
{ {
const char *p; const char *p;
enum tree_code code = gimple_assign_rhs_code (gs); enum tree_code code = gimple_assign_rhs_code (gs);
@ -559,7 +564,8 @@ dump_ternary_rhs (pretty_printer *buffer, gassign *gs, int spc, int flags)
pp_gimple_stmt_1. */ pp_gimple_stmt_1. */
static void static void
dump_gimple_assign (pretty_printer *buffer, gassign *gs, int spc, int flags) dump_gimple_assign (pretty_printer *buffer, gassign *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -620,7 +626,8 @@ dump_gimple_assign (pretty_printer *buffer, gassign *gs, int spc, int flags)
pp_gimple_stmt_1. */ pp_gimple_stmt_1. */
static void static void
dump_gimple_return (pretty_printer *buffer, greturn *gs, int spc, int flags) dump_gimple_return (pretty_printer *buffer, greturn *gs, int spc,
dump_flags_t flags)
{ {
tree t, t2; tree t, t2;
@ -650,7 +657,7 @@ dump_gimple_return (pretty_printer *buffer, greturn *gs, int spc, int flags)
dump_gimple_call. */ dump_gimple_call. */
static void static void
dump_gimple_call_args (pretty_printer *buffer, gcall *gs, int flags) dump_gimple_call_args (pretty_printer *buffer, gcall *gs, dump_flags_t flags)
{ {
size_t i = 0; size_t i = 0;
@ -806,7 +813,8 @@ pp_points_to_solution (pretty_printer *buffer, struct pt_solution *pt)
pp_gimple_stmt_1. */ pp_gimple_stmt_1. */
static void static void
dump_gimple_call (pretty_printer *buffer, gcall *gs, int spc, int flags) dump_gimple_call (pretty_printer *buffer, gcall *gs, int spc,
dump_flags_t flags)
{ {
tree lhs = gimple_call_lhs (gs); tree lhs = gimple_call_lhs (gs);
tree fn = gimple_call_fn (gs); tree fn = gimple_call_fn (gs);
@ -942,7 +950,7 @@ dump_gimple_call (pretty_printer *buffer, gcall *gs, int spc, int flags)
static void static void
dump_gimple_switch (pretty_printer *buffer, gswitch *gs, int spc, dump_gimple_switch (pretty_printer *buffer, gswitch *gs, int spc,
int flags) dump_flags_t flags)
{ {
unsigned int i; unsigned int i;
@ -999,7 +1007,8 @@ dump_gimple_switch (pretty_printer *buffer, gswitch *gs, int spc,
pp_gimple_stmt_1. */ pp_gimple_stmt_1. */
static void static void
dump_gimple_cond (pretty_printer *buffer, gcond *gs, int spc, int flags) dump_gimple_cond (pretty_printer *buffer, gcond *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T, %T>", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%s, %T, %T, %T, %T>", gs,
@ -1065,7 +1074,8 @@ dump_gimple_cond (pretty_printer *buffer, gcond *gs, int spc, int flags)
TDF_* in dumpfils.h). */ TDF_* in dumpfils.h). */
static void static void
dump_gimple_label (pretty_printer *buffer, glabel *gs, int spc, int flags) dump_gimple_label (pretty_printer *buffer, glabel *gs, int spc,
dump_flags_t flags)
{ {
tree label = gimple_label_label (gs); tree label = gimple_label_label (gs);
if (flags & TDF_RAW) if (flags & TDF_RAW)
@ -1091,7 +1101,8 @@ dump_gimple_label (pretty_printer *buffer, glabel *gs, int spc, int flags)
TDF_* in dumpfile.h). */ TDF_* in dumpfile.h). */
static void static void
dump_gimple_goto (pretty_printer *buffer, ggoto *gs, int spc, int flags) dump_gimple_goto (pretty_printer *buffer, ggoto *gs, int spc,
dump_flags_t flags)
{ {
tree label = gimple_goto_dest (gs); tree label = gimple_goto_dest (gs);
if (flags & TDF_RAW) if (flags & TDF_RAW)
@ -1106,7 +1117,8 @@ dump_gimple_goto (pretty_printer *buffer, ggoto *gs, int spc, int flags)
TDF_* in dumpfile.h). */ TDF_* in dumpfile.h). */
static void static void
dump_gimple_bind (pretty_printer *buffer, gbind *gs, int spc, int flags) dump_gimple_bind (pretty_printer *buffer, gbind *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <", gs); dump_gimple_fmt (buffer, spc, flags, "%G <", gs);
@ -1139,7 +1151,8 @@ dump_gimple_bind (pretty_printer *buffer, gbind *gs, int spc, int flags)
dumpfile.h). */ dumpfile.h). */
static void static void
dump_gimple_try (pretty_printer *buffer, gtry *gs, int spc, int flags) dump_gimple_try (pretty_printer *buffer, gtry *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -1195,7 +1208,8 @@ dump_gimple_try (pretty_printer *buffer, gtry *gs, int spc, int flags)
dumpfile.h). */ dumpfile.h). */
static void static void
dump_gimple_catch (pretty_printer *buffer, gcatch *gs, int spc, int flags) dump_gimple_catch (pretty_printer *buffer, gcatch *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%T, %+CATCH <%S>%->", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%T, %+CATCH <%S>%->", gs,
@ -1212,7 +1226,7 @@ dump_gimple_catch (pretty_printer *buffer, gcatch *gs, int spc, int flags)
static void static void
dump_gimple_eh_filter (pretty_printer *buffer, geh_filter *gs, int spc, dump_gimple_eh_filter (pretty_printer *buffer, geh_filter *gs, int spc,
int flags) dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%T, %+FAILURE <%S>%->", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%T, %+FAILURE <%S>%->", gs,
@ -1229,7 +1243,7 @@ dump_gimple_eh_filter (pretty_printer *buffer, geh_filter *gs, int spc,
static void static void
dump_gimple_eh_must_not_throw (pretty_printer *buffer, dump_gimple_eh_must_not_throw (pretty_printer *buffer,
geh_mnt *gs, int spc, int flags) geh_mnt *gs, int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs,
@ -1246,7 +1260,7 @@ dump_gimple_eh_must_not_throw (pretty_printer *buffer,
static void static void
dump_gimple_eh_else (pretty_printer *buffer, geh_else *gs, int spc, dump_gimple_eh_else (pretty_printer *buffer, geh_else *gs, int spc,
int flags) dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, dump_gimple_fmt (buffer, spc, flags,
@ -1264,7 +1278,8 @@ dump_gimple_eh_else (pretty_printer *buffer, geh_else *gs, int spc,
dumpfile.h). */ dumpfile.h). */
static void static void
dump_gimple_resx (pretty_printer *buffer, gresx *gs, int spc, int flags) dump_gimple_resx (pretty_printer *buffer, gresx *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs,
@ -1276,7 +1291,8 @@ dump_gimple_resx (pretty_printer *buffer, gresx *gs, int spc, int flags)
/* Dump a GIMPLE_EH_DISPATCH tuple on the pretty_printer BUFFER. */ /* Dump a GIMPLE_EH_DISPATCH tuple on the pretty_printer BUFFER. */
static void static void
dump_gimple_eh_dispatch (pretty_printer *buffer, geh_dispatch *gs, int spc, int flags) dump_gimple_eh_dispatch (pretty_printer *buffer, geh_dispatch *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs,
@ -1291,7 +1307,8 @@ dump_gimple_eh_dispatch (pretty_printer *buffer, geh_dispatch *gs, int spc, int
in dumpfile.h). */ in dumpfile.h). */
static void static void
dump_gimple_debug (pretty_printer *buffer, gdebug *gs, int spc, int flags) dump_gimple_debug (pretty_printer *buffer, gdebug *gs, int spc,
dump_flags_t flags)
{ {
switch (gs->subcode) switch (gs->subcode)
{ {
@ -1324,7 +1341,8 @@ dump_gimple_debug (pretty_printer *buffer, gdebug *gs, int spc, int flags)
/* Dump a GIMPLE_OMP_FOR tuple on the pretty_printer BUFFER. */ /* Dump a GIMPLE_OMP_FOR tuple on the pretty_printer BUFFER. */
static void static void
dump_gimple_omp_for (pretty_printer *buffer, gomp_for *gs, int spc, int flags) dump_gimple_omp_for (pretty_printer *buffer, gomp_for *gs, int spc,
dump_flags_t flags)
{ {
size_t i; size_t i;
@ -1476,7 +1494,7 @@ dump_gimple_omp_for (pretty_printer *buffer, gomp_for *gs, int spc, int flags)
static void static void
dump_gimple_omp_continue (pretty_printer *buffer, gomp_continue *gs, dump_gimple_omp_continue (pretty_printer *buffer, gomp_continue *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -1501,7 +1519,7 @@ dump_gimple_omp_continue (pretty_printer *buffer, gomp_continue *gs,
static void static void
dump_gimple_omp_single (pretty_printer *buffer, gomp_single *gs, dump_gimple_omp_single (pretty_printer *buffer, gomp_single *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -1530,7 +1548,7 @@ dump_gimple_omp_single (pretty_printer *buffer, gomp_single *gs,
static void static void
dump_gimple_omp_target (pretty_printer *buffer, gomp_target *gs, dump_gimple_omp_target (pretty_printer *buffer, gomp_target *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
const char *kind; const char *kind;
switch (gimple_omp_target_kind (gs)) switch (gimple_omp_target_kind (gs))
@ -1623,7 +1641,7 @@ dump_gimple_omp_target (pretty_printer *buffer, gomp_target *gs,
static void static void
dump_gimple_omp_teams (pretty_printer *buffer, gomp_teams *gs, int spc, dump_gimple_omp_teams (pretty_printer *buffer, gomp_teams *gs, int spc,
int flags) dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -1652,7 +1670,7 @@ dump_gimple_omp_teams (pretty_printer *buffer, gomp_teams *gs, int spc,
static void static void
dump_gimple_omp_sections (pretty_printer *buffer, gomp_sections *gs, dump_gimple_omp_sections (pretty_printer *buffer, gomp_sections *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -1688,7 +1706,8 @@ dump_gimple_omp_sections (pretty_printer *buffer, gomp_sections *gs,
pretty_printer BUFFER. */ pretty_printer BUFFER. */
static void static void
dump_gimple_omp_block (pretty_printer *buffer, gimple *gs, int spc, int flags) dump_gimple_omp_block (pretty_printer *buffer, gimple *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs,
@ -1728,7 +1747,7 @@ dump_gimple_omp_block (pretty_printer *buffer, gimple *gs, int spc, int flags)
static void static void
dump_gimple_omp_critical (pretty_printer *buffer, gomp_critical *gs, dump_gimple_omp_critical (pretty_printer *buffer, gomp_critical *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs,
@ -1760,7 +1779,7 @@ dump_gimple_omp_critical (pretty_printer *buffer, gomp_critical *gs,
static void static void
dump_gimple_omp_ordered (pretty_printer *buffer, gomp_ordered *gs, dump_gimple_omp_ordered (pretty_printer *buffer, gomp_ordered *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs, dump_gimple_fmt (buffer, spc, flags, "%G <%+BODY <%S> >", gs,
@ -1784,7 +1803,8 @@ dump_gimple_omp_ordered (pretty_printer *buffer, gomp_ordered *gs,
/* Dump a GIMPLE_OMP_RETURN tuple on the pretty_printer BUFFER. */ /* Dump a GIMPLE_OMP_RETURN tuple on the pretty_printer BUFFER. */
static void static void
dump_gimple_omp_return (pretty_printer *buffer, gimple *gs, int spc, int flags) dump_gimple_omp_return (pretty_printer *buffer, gimple *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -1815,7 +1835,7 @@ dump_gimple_omp_return (pretty_printer *buffer, gimple *gs, int spc, int flags)
static void static void
dump_gimple_transaction (pretty_printer *buffer, gtransaction *gs, dump_gimple_transaction (pretty_printer *buffer, gtransaction *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
unsigned subcode = gimple_transaction_subcode (gs); unsigned subcode = gimple_transaction_subcode (gs);
@ -1916,7 +1936,7 @@ dump_gimple_transaction (pretty_printer *buffer, gtransaction *gs,
dumpfile.h). */ dumpfile.h). */
static void static void
dump_gimple_asm (pretty_printer *buffer, gasm *gs, int spc, int flags) dump_gimple_asm (pretty_printer *buffer, gasm *gs, int spc, dump_flags_t flags)
{ {
unsigned int i, n, f, fields; unsigned int i, n, f, fields;
@ -2134,7 +2154,7 @@ dump_ssaname_info_to_file (FILE *file, tree node, int spc)
static void static void
dump_gimple_phi (pretty_printer *buffer, gphi *phi, int spc, bool comment, dump_gimple_phi (pretty_printer *buffer, gphi *phi, int spc, bool comment,
int flags) dump_flags_t flags)
{ {
size_t i; size_t i;
tree lhs = gimple_phi_result (phi); tree lhs = gimple_phi_result (phi);
@ -2198,7 +2218,7 @@ dump_gimple_phi (pretty_printer *buffer, gphi *phi, int spc, bool comment,
static void static void
dump_gimple_omp_parallel (pretty_printer *buffer, gomp_parallel *gs, dump_gimple_omp_parallel (pretty_printer *buffer, gomp_parallel *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -2252,7 +2272,7 @@ dump_gimple_omp_parallel (pretty_printer *buffer, gomp_parallel *gs,
static void static void
dump_gimple_omp_task (pretty_printer *buffer, gomp_task *gs, int spc, dump_gimple_omp_task (pretty_printer *buffer, gomp_task *gs, int spc,
int flags) dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -2312,7 +2332,7 @@ dump_gimple_omp_task (pretty_printer *buffer, gomp_task *gs, int spc,
static void static void
dump_gimple_omp_atomic_load (pretty_printer *buffer, gomp_atomic_load *gs, dump_gimple_omp_atomic_load (pretty_printer *buffer, gomp_atomic_load *gs,
int spc, int flags) int spc, dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -2345,7 +2365,8 @@ dump_gimple_omp_atomic_load (pretty_printer *buffer, gomp_atomic_load *gs,
static void static void
dump_gimple_omp_atomic_store (pretty_printer *buffer, dump_gimple_omp_atomic_store (pretty_printer *buffer,
gomp_atomic_store *gs, int spc, int flags) gomp_atomic_store *gs, int spc,
dump_flags_t flags)
{ {
if (flags & TDF_RAW) if (flags & TDF_RAW)
{ {
@ -2371,7 +2392,8 @@ dump_gimple_omp_atomic_store (pretty_printer *buffer,
FLAGS are as in pp_gimple_stmt_1. */ FLAGS are as in pp_gimple_stmt_1. */
static void static void
dump_gimple_mem_ops (pretty_printer *buffer, gimple *gs, int spc, int flags) dump_gimple_mem_ops (pretty_printer *buffer, gimple *gs, int spc,
dump_flags_t flags)
{ {
tree vdef = gimple_vdef (gs); tree vdef = gimple_vdef (gs);
tree vuse = gimple_vuse (gs); tree vuse = gimple_vuse (gs);
@ -2401,7 +2423,8 @@ dump_gimple_mem_ops (pretty_printer *buffer, gimple *gs, int spc, int flags)
pp_flush on BUFFER to finalize the pretty printer. */ pp_flush on BUFFER to finalize the pretty printer. */
void void
pp_gimple_stmt_1 (pretty_printer *buffer, gimple *gs, int spc, int flags) pp_gimple_stmt_1 (pretty_printer *buffer, gimple *gs, int spc,
dump_flags_t flags)
{ {
if (!gs) if (!gs)
return; return;
@ -2609,7 +2632,8 @@ pp_gimple_stmt_1 (pretty_printer *buffer, gimple *gs, int spc, int flags)
spaces and details described by flags. */ spaces and details described by flags. */
static void static void
dump_gimple_bb_header (FILE *outf, basic_block bb, int indent, int flags) dump_gimple_bb_header (FILE *outf, basic_block bb, int indent,
dump_flags_t flags)
{ {
if (flags & TDF_BLOCKS) if (flags & TDF_BLOCKS)
{ {
@ -2655,7 +2679,7 @@ static void
dump_gimple_bb_footer (FILE *outf ATTRIBUTE_UNUSED, dump_gimple_bb_footer (FILE *outf ATTRIBUTE_UNUSED,
basic_block bb ATTRIBUTE_UNUSED, basic_block bb ATTRIBUTE_UNUSED,
int indent ATTRIBUTE_UNUSED, int indent ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) dump_flags_t flags ATTRIBUTE_UNUSED)
{ {
/* There is currently no GIMPLE-specific basic block info to dump. */ /* There is currently no GIMPLE-specific basic block info to dump. */
return; return;
@ -2666,7 +2690,8 @@ dump_gimple_bb_footer (FILE *outf ATTRIBUTE_UNUSED,
by FLAGS and indented by INDENT spaces. */ by FLAGS and indented by INDENT spaces. */
static void static void
dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent, int flags) dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent,
dump_flags_t flags)
{ {
gphi_iterator i; gphi_iterator i;
@ -2688,7 +2713,7 @@ dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent, int flags)
to BUFFER. */ to BUFFER. */
static void static void
pp_cfg_jump (pretty_printer *buffer, edge e, int flags) pp_cfg_jump (pretty_printer *buffer, edge e, dump_flags_t flags)
{ {
if (flags & TDF_GIMPLE) if (flags & TDF_GIMPLE)
{ {
@ -2725,7 +2750,7 @@ pp_cfg_jump (pretty_printer *buffer, edge e, int flags)
static void static void
dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent, dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent,
int flags) dump_flags_t flags)
{ {
edge e; edge e;
gimple *stmt; gimple *stmt;
@ -2776,7 +2801,7 @@ dump_implicit_edges (pretty_printer *buffer, basic_block bb, int indent,
static void static void
gimple_dump_bb_buff (pretty_printer *buffer, basic_block bb, int indent, gimple_dump_bb_buff (pretty_printer *buffer, basic_block bb, int indent,
int flags) dump_flags_t flags)
{ {
gimple_stmt_iterator gsi; gimple_stmt_iterator gsi;
gimple *stmt; gimple *stmt;
@ -2812,7 +2837,7 @@ gimple_dump_bb_buff (pretty_printer *buffer, basic_block bb, int indent,
indented by INDENT spaces. */ indented by INDENT spaces. */
void void
gimple_dump_bb (FILE *file, basic_block bb, int indent, int flags) gimple_dump_bb (FILE *file, basic_block bb, int indent, dump_flags_t flags)
{ {
dump_gimple_bb_header (file, bb, indent, flags); dump_gimple_bb_header (file, bb, indent, flags);
if (bb->index >= NUM_FIXED_BLOCKS) if (bb->index >= NUM_FIXED_BLOCKS)

View File

@ -26,13 +26,13 @@ along with GCC; see the file COPYING3. If not see
/* In gimple-pretty-print.c */ /* In gimple-pretty-print.c */
extern void debug_gimple_stmt (gimple *); extern void debug_gimple_stmt (gimple *);
extern void debug_gimple_seq (gimple_seq); extern void debug_gimple_seq (gimple_seq);
extern void print_gimple_seq (FILE *, gimple_seq, int, int); extern void print_gimple_seq (FILE *, gimple_seq, int, dump_flags_t);
extern void print_gimple_stmt (FILE *, gimple *, int, int = 0); extern void print_gimple_stmt (FILE *, gimple *, int, dump_flags_t = TDF_NONE);
extern void debug (gimple &ref); extern void debug (gimple &ref);
extern void debug (gimple *ptr); extern void debug (gimple *ptr);
extern void print_gimple_expr (FILE *, gimple *, int, int = 0); extern void print_gimple_expr (FILE *, gimple *, int, dump_flags_t = TDF_NONE);
extern void pp_gimple_stmt_1 (pretty_printer *, gimple *, int, int); extern void pp_gimple_stmt_1 (pretty_printer *, gimple *, int, dump_flags_t);
extern void gimple_dump_bb (FILE *, basic_block, int, int); extern void gimple_dump_bb (FILE *, basic_block, int, dump_flags_t);
extern void gimple_dump_bb_for_graph (pretty_printer *, basic_block); extern void gimple_dump_bb_for_graph (pretty_printer *, basic_block);
extern void dump_ssaname_info_to_file (FILE *, tree, int); extern void dump_ssaname_info_to_file (FILE *, tree, int);

View File

@ -291,9 +291,9 @@ print_graph_cfg (FILE *fp, struct function *fun)
/* Overload with additional flag argument. */ /* Overload with additional flag argument. */
void DEBUG_FUNCTION void DEBUG_FUNCTION
print_graph_cfg (FILE *fp, struct function *fun, int flags) print_graph_cfg (FILE *fp, struct function *fun, dump_flags_t flags)
{ {
int saved_dump_flags = dump_flags; dump_flags_t saved_dump_flags = dump_flags;
dump_flags = flags; dump_flags = flags;
print_graph_cfg (fp, fun); print_graph_cfg (fp, fun);
dump_flags = saved_dump_flags; dump_flags = saved_dump_flags;

View File

@ -96,8 +96,8 @@ DEBUG_FUNCTION void
dot_all_sese (FILE *file, vec<sese_l>& scops) dot_all_sese (FILE *file, vec<sese_l>& scops)
{ {
/* Disable debugging while printing graph. */ /* Disable debugging while printing graph. */
int tmp_dump_flags = dump_flags; dump_flags_t tmp_dump_flags = dump_flags;
dump_flags = 0; dump_flags = TDF_NONE;
fprintf (file, "digraph all {\n"); fprintf (file, "digraph all {\n");

View File

@ -2260,7 +2260,7 @@ build_type_inheritance_graph (void)
{ {
struct symtab_node *n; struct symtab_node *n;
FILE *inheritance_dump_file; FILE *inheritance_dump_file;
int flags; dump_flags_t flags;
if (odr_hash) if (odr_hash)
return; return;

View File

@ -191,7 +191,7 @@ static rtx get_expansion (struct var_to_expand *);
static void static void
report_unroll (struct loop *loop, location_t locus) report_unroll (struct loop *loop, location_t locus)
{ {
int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS; dump_flags_t report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS;
if (loop->lpt_decision.decision == LPT_NONE) if (loop->lpt_decision.decision == LPT_NONE)
return; return;

View File

@ -776,7 +776,8 @@ pass_manager::register_one_dump_file (opt_pass *pass)
/* Buffer big enough to format a 32-bit UINT_MAX into. */ /* Buffer big enough to format a 32-bit UINT_MAX into. */
char num[11]; char num[11];
int flags, id; dump_flags_t flags;
int id;
int optgroup_flags = OPTGROUP_NONE; int optgroup_flags = OPTGROUP_NONE;
gcc::dump_manager *dumps = m_ctxt->get_dumps (); gcc::dump_manager *dumps = m_ctxt->get_dumps ();

View File

@ -1007,7 +1007,7 @@ debug_raw (const tree_node *ptr)
} }
static void static void
dump_tree_via_hooks (const tree_node *ptr, int options) dump_tree_via_hooks (const tree_node *ptr, dump_flags_t options)
{ {
if (DECL_P (ptr)) if (DECL_P (ptr))
lang_hooks.print_decl (stderr, const_cast <tree_node*> (ptr), 0); lang_hooks.print_decl (stderr, const_cast <tree_node*> (ptr), 0);

View File

@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "pass_manager.h" #include "pass_manager.h"
static int statistics_dump_nr; static int statistics_dump_nr;
static int statistics_dump_flags; static dump_flags_t statistics_dump_flags;
static FILE *statistics_dump_file; static FILE *statistics_dump_file;
/* Statistics entry. A integer counter associated to a string ID /* Statistics entry. A integer counter associated to a string ID

View File

@ -2376,7 +2376,7 @@ gimple_debug_bb_n (int n)
(see TDF_* in dumpfile.h). */ (see TDF_* in dumpfile.h). */
void void
gimple_debug_cfg (int flags) gimple_debug_cfg (dump_flags_t flags)
{ {
gimple_dump_cfg (stderr, flags); gimple_dump_cfg (stderr, flags);
} }
@ -2388,7 +2388,7 @@ gimple_debug_cfg (int flags)
tree.h). */ tree.h). */
void void
gimple_dump_cfg (FILE *file, int flags) gimple_dump_cfg (FILE *file, dump_flags_t flags)
{ {
if (flags & TDF_DETAILS) if (flags & TDF_DETAILS)
{ {
@ -7518,7 +7518,7 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb,
SPC. */ SPC. */
static void static void
dump_default_def (FILE *file, tree def, int spc, int flags) dump_default_def (FILE *file, tree def, int spc, dump_flags_t flags)
{ {
for (int i = 0; i < spc; ++i) for (int i = 0; i < spc; ++i)
fprintf (file, " "); fprintf (file, " ");
@ -7536,7 +7536,7 @@ dump_default_def (FILE *file, tree def, int spc, int flags)
*/ */
void void
dump_function_to_file (tree fndecl, FILE *file, int flags) dump_function_to_file (tree fndecl, FILE *file, dump_flags_t flags)
{ {
tree arg, var, old_current_fndecl = current_function_decl; tree arg, var, old_current_fndecl = current_function_decl;
struct function *dsf; struct function *dsf;
@ -7759,7 +7759,7 @@ dump_function_to_file (tree fndecl, FILE *file, int flags)
/* Dump FUNCTION_DECL FN to stderr using FLAGS (see TDF_* in tree.h) */ /* Dump FUNCTION_DECL FN to stderr using FLAGS (see TDF_* in tree.h) */
DEBUG_FUNCTION void DEBUG_FUNCTION void
debug_function (tree fn, int flags) debug_function (tree fn, dump_flags_t flags)
{ {
dump_function_to_file (fn, stderr, flags); dump_function_to_file (fn, stderr, flags);
} }

View File

@ -46,7 +46,7 @@ extern edge find_taken_edge (basic_block, tree);
extern void gimple_debug_bb (basic_block); extern void gimple_debug_bb (basic_block);
extern basic_block gimple_debug_bb_n (int); extern basic_block gimple_debug_bb_n (int);
extern void gimple_debug_cfg (int); extern void gimple_debug_cfg (int);
extern void gimple_dump_cfg (FILE *, int); extern void gimple_dump_cfg (FILE *, dump_flags_t);
extern void dump_cfg_stats (FILE *); extern void dump_cfg_stats (FILE *);
extern void debug_cfg_stats (void); extern void debug_cfg_stats (void);
extern bool computed_goto_p (gimple *); extern bool computed_goto_p (gimple *);
@ -79,7 +79,7 @@ extern void verify_sese (basic_block, basic_block, vec<basic_block> *);
extern bool gather_ssa_name_hash_map_from (tree const &, tree const &, void *); extern bool gather_ssa_name_hash_map_from (tree const &, tree const &, void *);
extern basic_block move_sese_region_to_fn (struct function *, basic_block, extern basic_block move_sese_region_to_fn (struct function *, basic_block,
basic_block, tree); basic_block, tree);
extern void dump_function_to_file (tree, FILE *, int); extern void dump_function_to_file (tree, FILE *, dump_flags_t);
extern void debug_function (tree, int) ; extern void debug_function (tree, int) ;
extern void print_loops_bb (FILE *, basic_block, int, int); extern void print_loops_bb (FILE *, basic_block, int, int);
extern void print_loops (FILE *, int); extern void print_loops (FILE *, int);

View File

@ -898,7 +898,7 @@ dump_enumerated_decls_push (tree *tp, int *walk_subtrees, void *data)
FILE is the dump file where to output the list and FLAGS is as in FILE is the dump file where to output the list and FLAGS is as in
print_generic_expr. */ print_generic_expr. */
void void
dump_enumerated_decls (FILE *file, int flags) dump_enumerated_decls (FILE *file, dump_flags_t flags)
{ {
basic_block bb; basic_block bb;
struct walk_stmt_info wi; struct walk_stmt_info wi;

View File

@ -36,7 +36,7 @@ extern tree get_addr_base_and_unit_offset_1 (tree, HOST_WIDE_INT *,
extern tree get_addr_base_and_unit_offset (tree, HOST_WIDE_INT *); extern tree get_addr_base_and_unit_offset (tree, HOST_WIDE_INT *);
extern bool stmt_references_abnormal_ssa_name (gimple *); extern bool stmt_references_abnormal_ssa_name (gimple *);
extern void replace_abnormal_ssa_names (gimple *); extern void replace_abnormal_ssa_names (gimple *);
extern void dump_enumerated_decls (FILE *, int); extern void dump_enumerated_decls (FILE *, dump_flags_t);
#endif /* GCC_TREE_DFA_H */ #endif /* GCC_TREE_DFA_H */

View File

@ -713,7 +713,7 @@ dequeue_and_dump (dump_info_p di)
/* Return nonzero if FLAG has been specified for the dump, and NODE /* Return nonzero if FLAG has been specified for the dump, and NODE
is not the root node of the dump. */ is not the root node of the dump. */
int dump_flag (dump_info_p di, int flag, const_tree node) int dump_flag (dump_info_p di, dump_flags_t flag, const_tree node)
{ {
return (di->flags & flag) && (node != di->node); return (di->flags & flag) && (node != di->node);
} }
@ -721,7 +721,7 @@ int dump_flag (dump_info_p di, int flag, const_tree node)
/* Dump T, and all its children, on STREAM. */ /* Dump T, and all its children, on STREAM. */
void void
dump_node (const_tree t, int flags, FILE *stream) dump_node (const_tree t, dump_flags_t flags, FILE *stream)
{ {
struct dump_info di; struct dump_info di;
dump_queue_p dq; dump_queue_p dq;

View File

@ -60,7 +60,7 @@ struct dump_info
/* The original node. */ /* The original node. */
const_tree node; const_tree node;
/* User flags. */ /* User flags. */
int flags; dump_flags_t flags;
/* The next unused node index. */ /* The next unused node index. */
unsigned int index; unsigned int index;
/* The next column. */ /* The next column. */
@ -87,6 +87,6 @@ extern void dump_string (dump_info_p, const char *);
extern void dump_string_field (dump_info_p, const char *, const char *); extern void dump_string_field (dump_info_p, const char *, const char *);
extern void queue_and_dump_index (dump_info_p, const char *, const_tree, int); extern void queue_and_dump_index (dump_info_p, const char *, const_tree, int);
extern void queue_and_dump_type (dump_info_p, const_tree); extern void queue_and_dump_type (dump_info_p, const_tree);
extern int dump_flag (dump_info_p, int, const_tree); extern int dump_flag (dump_info_p, dump_flags_t, const_tree);
#endif /* ! GCC_TREE_DUMP_H */ #endif /* ! GCC_TREE_DUMP_H */

View File

@ -39,8 +39,8 @@ static const char *op_symbol (const_tree);
static void pretty_print_string (pretty_printer *, const char*); static void pretty_print_string (pretty_printer *, const char*);
static void newline_and_indent (pretty_printer *, int); static void newline_and_indent (pretty_printer *, int);
static void maybe_init_pretty_print (FILE *); static void maybe_init_pretty_print (FILE *);
static void print_struct_decl (pretty_printer *, const_tree, int, int); static void print_struct_decl (pretty_printer *, const_tree, int, dump_flags_t);
static void do_niy (pretty_printer *, const_tree, int); static void do_niy (pretty_printer *, const_tree, dump_flags_t);
#define INDENT(SPACE) do { \ #define INDENT(SPACE) do { \
int i; for (i = 0; i<SPACE; i++) pp_space (pp); } while (0) int i; for (i = 0; i<SPACE; i++) pp_space (pp); } while (0)
@ -52,7 +52,7 @@ static pretty_printer *tree_pp;
/* Try to print something for an unknown tree code. */ /* Try to print something for an unknown tree code. */
static void static void
do_niy (pretty_printer *pp, const_tree node, int flags) do_niy (pretty_printer *pp, const_tree node, dump_flags_t flags)
{ {
int i, len; int i, len;
@ -115,7 +115,7 @@ debug_tree_chain (tree t)
/* Prints declaration DECL to the FILE with details specified by FLAGS. */ /* Prints declaration DECL to the FILE with details specified by FLAGS. */
void void
print_generic_decl (FILE *file, tree decl, int flags) print_generic_decl (FILE *file, tree decl, dump_flags_t flags)
{ {
maybe_init_pretty_print (file); maybe_init_pretty_print (file);
print_declaration (tree_pp, decl, 2, flags); print_declaration (tree_pp, decl, 2, flags);
@ -126,7 +126,7 @@ print_generic_decl (FILE *file, tree decl, int flags)
to show in the dump. See TDF_* in dumpfile.h. */ to show in the dump. See TDF_* in dumpfile.h. */
void void
print_generic_stmt (FILE *file, tree t, int flags) print_generic_stmt (FILE *file, tree t, dump_flags_t flags)
{ {
maybe_init_pretty_print (file); maybe_init_pretty_print (file);
dump_generic_node (tree_pp, t, 0, flags, true); dump_generic_node (tree_pp, t, 0, flags, true);
@ -138,7 +138,7 @@ print_generic_stmt (FILE *file, tree t, int flags)
INDENT spaces. */ INDENT spaces. */
void void
print_generic_stmt_indented (FILE *file, tree t, int flags, int indent) print_generic_stmt_indented (FILE *file, tree t, dump_flags_t flags, int indent)
{ {
int i; int i;
@ -154,7 +154,7 @@ print_generic_stmt_indented (FILE *file, tree t, int flags, int indent)
in the dump. See TDF_* in dumpfile.h. */ in the dump. See TDF_* in dumpfile.h. */
void void
print_generic_expr (FILE *file, tree t, int flags) print_generic_expr (FILE *file, tree t, dump_flags_t flags)
{ {
maybe_init_pretty_print (file); maybe_init_pretty_print (file);
dump_generic_node (tree_pp, t, 0, flags, false); dump_generic_node (tree_pp, t, 0, flags, false);
@ -244,7 +244,7 @@ dump_fancy_name (pretty_printer *pp, tree name)
in FLAGS. */ in FLAGS. */
static void static void
dump_decl_name (pretty_printer *pp, tree node, int flags) dump_decl_name (pretty_printer *pp, tree node, dump_flags_t flags)
{ {
if (DECL_NAME (node)) if (DECL_NAME (node))
{ {
@ -290,7 +290,7 @@ dump_decl_name (pretty_printer *pp, tree node, int flags)
/* Like the above, but used for pretty printing function calls. */ /* Like the above, but used for pretty printing function calls. */
static void static void
dump_function_name (pretty_printer *pp, tree node, int flags) dump_function_name (pretty_printer *pp, tree node, dump_flags_t flags)
{ {
if (CONVERT_EXPR_P (node)) if (CONVERT_EXPR_P (node))
node = TREE_OPERAND (node, 0); node = TREE_OPERAND (node, 0);
@ -305,7 +305,7 @@ dump_function_name (pretty_printer *pp, tree node, int flags)
static void static void
dump_function_declaration (pretty_printer *pp, tree node, dump_function_declaration (pretty_printer *pp, tree node,
int spc, int flags) int spc, dump_flags_t flags)
{ {
bool wrote_arg = false; bool wrote_arg = false;
tree arg; tree arg;
@ -341,7 +341,7 @@ dump_function_declaration (pretty_printer *pp, tree node,
/* Dump the domain associated with an array. */ /* Dump the domain associated with an array. */
static void static void
dump_array_domain (pretty_printer *pp, tree domain, int spc, int flags) dump_array_domain (pretty_printer *pp, tree domain, int spc, dump_flags_t flags)
{ {
pp_left_bracket (pp); pp_left_bracket (pp);
if (domain) if (domain)
@ -372,7 +372,7 @@ dump_array_domain (pretty_printer *pp, tree domain, int spc, int flags)
dump_generic_node. */ dump_generic_node. */
static void static void
dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags) dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags)
{ {
const char *name; const char *name;
@ -1051,7 +1051,7 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
dump_generic_node. */ dump_generic_node. */
void void
dump_omp_clauses (pretty_printer *pp, tree clause, int spc, int flags) dump_omp_clauses (pretty_printer *pp, tree clause, int spc, dump_flags_t flags)
{ {
if (clause == NULL) if (clause == NULL)
return; return;
@ -1092,7 +1092,7 @@ dump_location (pretty_printer *pp, location_t loc)
dump_generic_node. */ dump_generic_node. */
static void static void
dump_block_node (pretty_printer *pp, tree block, int spc, int flags) dump_block_node (pretty_printer *pp, tree block, int spc, dump_flags_t flags)
{ {
tree t; tree t;
@ -1205,7 +1205,7 @@ dump_block_node (pretty_printer *pp, tree block, int spc, int flags)
to be a statement and it is terminated by ';' if appropriate. */ to be a statement and it is terminated by ';' if appropriate. */
int int
dump_generic_node (pretty_printer *pp, tree node, int spc, int flags, dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
bool is_stmt) bool is_stmt)
{ {
tree type; tree type;
@ -3313,7 +3313,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags,
/* Print the declaration of a variable. */ /* Print the declaration of a variable. */
void void
print_declaration (pretty_printer *pp, tree t, int spc, int flags) print_declaration (pretty_printer *pp, tree t, int spc, dump_flags_t flags)
{ {
INDENT (spc); INDENT (spc);
@ -3414,7 +3414,8 @@ print_declaration (pretty_printer *pp, tree t, int spc, int flags)
FIXME: Still incomplete. */ FIXME: Still incomplete. */
static void static void
print_struct_decl (pretty_printer *pp, const_tree node, int spc, int flags) print_struct_decl (pretty_printer *pp, const_tree node, int spc,
dump_flags_t flags)
{ {
/* Print the name of the structure. */ /* Print the name of the structure. */
if (TYPE_NAME (node)) if (TYPE_NAME (node))
@ -3810,7 +3811,7 @@ op_symbol (const_tree op)
the gimple_call_fn of a GIMPLE_CALL. */ the gimple_call_fn of a GIMPLE_CALL. */
void void
print_call_name (pretty_printer *pp, tree node, int flags) print_call_name (pretty_printer *pp, tree node, dump_flags_t flags)
{ {
tree op0 = node; tree op0 = node;
@ -4050,7 +4051,7 @@ pp_tree_identifier (pretty_printer *pp, tree id)
function dump. */ function dump. */
void void
dump_function_header (FILE *dump_file, tree fdecl, int flags) dump_function_header (FILE *dump_file, tree fdecl, dump_flags_t flags)
{ {
const char *dname, *aname; const char *dname, *aname;
struct cgraph_node *node = cgraph_node::get (fdecl); struct cgraph_node *node = cgraph_node::get (fdecl);

View File

@ -34,20 +34,20 @@ along with GCC; see the file COPYING3. If not see
extern void debug_generic_expr (tree); extern void debug_generic_expr (tree);
extern void debug_generic_stmt (tree); extern void debug_generic_stmt (tree);
extern void debug_tree_chain (tree); extern void debug_tree_chain (tree);
extern void print_generic_decl (FILE *, tree, int); extern void print_generic_decl (FILE *, tree, dump_flags_t);
extern void print_generic_stmt (FILE *, tree, int = 0); extern void print_generic_stmt (FILE *, tree, dump_flags_t = TDF_NONE);
extern void print_generic_stmt_indented (FILE *, tree, int, int); extern void print_generic_stmt_indented (FILE *, tree, dump_flags_t, int);
extern void print_generic_expr (FILE *, tree, int = 0); extern void print_generic_expr (FILE *, tree, dump_flags_t = TDF_NONE);
extern void dump_omp_clauses (pretty_printer *, tree, int, int); extern void dump_omp_clauses (pretty_printer *, tree, int, dump_flags_t);
extern int dump_generic_node (pretty_printer *, tree, int, int, bool); extern int dump_generic_node (pretty_printer *, tree, int, dump_flags_t, bool);
extern void print_declaration (pretty_printer *, tree, int, int); extern void print_declaration (pretty_printer *, tree, int, dump_flags_t);
extern int op_code_prio (enum tree_code); extern int op_code_prio (enum tree_code);
extern int op_prio (const_tree); extern int op_prio (const_tree);
extern const char *op_symbol_code (enum tree_code); extern const char *op_symbol_code (enum tree_code);
extern void print_call_name (pretty_printer *, tree, int); extern void print_call_name (pretty_printer *, tree, dump_flags_t);
extern void percent_K_format (text_info *); extern void percent_K_format (text_info *);
extern void pp_tree_identifier (pretty_printer *, tree); extern void pp_tree_identifier (pretty_printer *, tree);
extern void dump_function_header (FILE *, tree, int); extern void dump_function_header (FILE *, tree, dump_flags_t);
extern void pp_double_int (pretty_printer *pp, double_int d, bool uns); extern void pp_double_int (pretty_printer *pp, double_int d, bool uns);
extern void dump_location (pretty_printer *buffer, location_t loc); extern void dump_location (pretty_printer *buffer, location_t loc);

View File

@ -613,7 +613,7 @@ clear_unused_block_pointer (void)
indentation level and FLAGS is as in print_generic_expr. */ indentation level and FLAGS is as in print_generic_expr. */
static void static void
dump_scope_block (FILE *file, int indent, tree scope, int flags) dump_scope_block (FILE *file, int indent, tree scope, dump_flags_t flags)
{ {
tree var, t; tree var, t;
unsigned int i; unsigned int i;
@ -661,7 +661,7 @@ dump_scope_block (FILE *file, int indent, tree scope, int flags)
is as in print_generic_expr. */ is as in print_generic_expr. */
DEBUG_FUNCTION void DEBUG_FUNCTION void
debug_scope_block (tree scope, int flags) debug_scope_block (tree scope, dump_flags_t flags)
{ {
dump_scope_block (stderr, 0, scope, flags); dump_scope_block (stderr, 0, scope, flags);
} }
@ -671,7 +671,7 @@ debug_scope_block (tree scope, int flags)
FLAGS is as in print_generic_expr. */ FLAGS is as in print_generic_expr. */
void void
dump_scope_blocks (FILE *file, int flags) dump_scope_blocks (FILE *file, dump_flags_t flags)
{ {
dump_scope_block (file, 0, DECL_INITIAL (current_function_decl), flags); dump_scope_block (file, 0, DECL_INITIAL (current_function_decl), flags);
} }
@ -681,7 +681,7 @@ dump_scope_blocks (FILE *file, int flags)
FLAGS is as in print_generic_expr. */ FLAGS is as in print_generic_expr. */
DEBUG_FUNCTION void DEBUG_FUNCTION void
debug_scope_blocks (int flags) debug_scope_blocks (dump_flags_t flags)
{ {
dump_scope_blocks (stderr, flags); dump_scope_blocks (stderr, flags);
} }

View File

@ -73,9 +73,9 @@ extern void delete_var_map (var_map);
extern int var_union (var_map, tree, tree); extern int var_union (var_map, tree, tree);
extern void partition_view_normal (var_map); extern void partition_view_normal (var_map);
extern void partition_view_bitmap (var_map, bitmap); extern void partition_view_bitmap (var_map, bitmap);
extern void dump_scope_blocks (FILE *, int); extern void dump_scope_blocks (FILE *, dump_flags_t);
extern void debug_scope_block (tree, int); extern void debug_scope_block (tree, dump_flags_t);
extern void debug_scope_blocks (int); extern void debug_scope_blocks (dump_flags_t);
extern void remove_unused_locals (void); extern void remove_unused_locals (void);
extern void dump_var_map (FILE *, var_map); extern void dump_var_map (FILE *, var_map);
extern void debug (_var_map &ref); extern void debug (_var_map &ref);

View File

@ -686,7 +686,7 @@ try_unroll_loop_completely (struct loop *loop,
struct loop_size size; struct loop_size size;
bool n_unroll_found = false; bool n_unroll_found = false;
edge edge_to_cancel = NULL; edge edge_to_cancel = NULL;
int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS; dump_flags_t report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS;
/* See if we proved number of iterations to be low constant. /* See if we proved number of iterations to be low constant.

View File

@ -2432,7 +2432,7 @@ reduction_code_for_scalar_code (enum tree_code code,
STMT is printed with a message MSG. */ STMT is printed with a message MSG. */
static void static void
report_vect_op (int msg_type, gimple *stmt, const char *msg) report_vect_op (dump_flags_t msg_type, gimple *stmt, const char *msg)
{ {
dump_printf_loc (msg_type, vect_location, "%s", msg); dump_printf_loc (msg_type, vect_location, "%s", msg);
dump_gimple_stmt (msg_type, TDF_SLIM, stmt, 0); dump_gimple_stmt (msg_type, TDF_SLIM, stmt, 0);

View File

@ -1220,7 +1220,7 @@ fail:
/* Dump a slp tree NODE using flags specified in DUMP_KIND. */ /* Dump a slp tree NODE using flags specified in DUMP_KIND. */
static void static void
vect_print_slp_tree (int dump_kind, location_t loc, slp_tree node) vect_print_slp_tree (dump_flags_t dump_kind, location_t loc, slp_tree node)
{ {
int i; int i;
gimple *stmt; gimple *stmt;