cfg.c (dump_flow_info): Get dump flags as an additional parameter.

2006-02-15  Paolo Bonzini  <bonzini@gnu.org>

	* cfg.c (dump_flow_info): Get dump flags as an additional parameter.
	(debug_flow_info): Pass it.
	* alias.c (rest_of_handle_cfg): Adjust calls to dump_flow_info.
	* bb-reorder.c (reorder_basic_blocks): Likewise.
	* cfgcleanup.c (rest_of_handle_jump2): Likewise.
	* cse.c (rest_of_handle_cse, rest_of_handle_cse2): Likewise.
	* flow.c (life_analysis, recompute_reg_usage): Likewise.
	* gcse.c (gcse_main, bypass_jumps): Likewise.
	* ifcvt.c (rest_of_handle_if_conversion): Likewise.
	* local-alloc.c (rest_of_handle_local_alloc): Likewise.
	* loop-init.c (rtl_loop_init, rtl_loop_done): Likewise.
	* profile.c (compute_branch_probabilities, branch_prob): Likewise.
	* rtl.h (dump_flow_info): Adjust prototype.
	* tracer.c (rest_of_handle_tracer, tracer): Likewise.
	* var-tracking.c (variable_tracking_main): Likewise.
	* passes.c (execute_todo): Obey TDF_BLOCKS for RTL.
	* tree-dump.c (enable_rtl_dump_file): Enable the details and blocks
	options.

From-SVN: r111020
This commit is contained in:
Paolo Bonzini 2006-02-15 09:15:56 +00:00 committed by Paolo Bonzini
parent bc4632d404
commit 5b4fdb2060
17 changed files with 50 additions and 33 deletions

View File

@ -1,3 +1,24 @@
2006-02-15 Paolo Bonzini <bonzini@gnu.org>
* cfg.c (dump_flow_info): Get dump flags as an additional parameter.
(debug_flow_info): Pass it.
* alias.c (rest_of_handle_cfg): Adjust calls to dump_flow_info.
* bb-reorder.c (reorder_basic_blocks): Likewise.
* cfgcleanup.c (rest_of_handle_jump2): Likewise.
* cse.c (rest_of_handle_cse, rest_of_handle_cse2): Likewise.
* flow.c (life_analysis, recompute_reg_usage): Likewise.
* gcse.c (gcse_main, bypass_jumps): Likewise.
* ifcvt.c (rest_of_handle_if_conversion): Likewise.
* local-alloc.c (rest_of_handle_local_alloc): Likewise.
* loop-init.c (rtl_loop_init, rtl_loop_done): Likewise.
* profile.c (compute_branch_probabilities, branch_prob): Likewise.
* rtl.h (dump_flow_info): Adjust prototype.
* tracer.c (rest_of_handle_tracer, tracer): Likewise.
* var-tracking.c (variable_tracking_main): Likewise.
* passes.c (execute_todo): Obey TDF_BLOCKS for RTL.
* tree-dump.c (enable_rtl_dump_file): Enable the details and blocks
options.
2006-02-15 Marcin Dalecki <martin@dalecki.de>
* tree-ssa-dom.c (dom_thread_across_edge): fix tag expression

View File

@ -2710,7 +2710,7 @@ static void
rest_of_handle_cfg (void)
{
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
if (optimize)
cleanup_cfg (CLEANUP_EXPENSIVE
| (flag_thread_jumps ? CLEANUP_THREADING : 0));

View File

@ -1930,7 +1930,7 @@ reorder_basic_blocks (unsigned int flags)
FREE (bbd);
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
cfg_layout_finalize ();
if (flag_reorder_blocks_and_partition)

View File

@ -528,17 +528,13 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
}
void
dump_flow_info (FILE *file)
dump_flow_info (FILE *file, int flags)
{
basic_block bb;
if (file == dump_file
&& (dump_flags & TDF_SLIM)
&& !(dump_flags & TDF_DETAILS))
return;
/* There are no pseudo registers after reload. Don't dump them. */
if (reg_n_info && !reload_completed)
if (reg_n_info && !reload_completed
&& (flags & TDF_DETAILS) != 0)
{
unsigned int i, max = max_reg_num ();
fprintf (file, "%d registers.\n", max);
@ -589,7 +585,7 @@ dump_flow_info (FILE *file)
fprintf (file, "\n%d basic blocks, %d edges.\n", n_basic_blocks, n_edges);
FOR_EACH_BB (bb)
{
dump_bb_info (bb, true, true, TDF_DETAILS, "", file);
dump_bb_info (bb, true, true, flags, "", file);
check_bb_profile (bb, file);
}
@ -599,7 +595,7 @@ dump_flow_info (FILE *file)
void
debug_flow_info (void)
{
dump_flow_info (stderr);
dump_flow_info (stderr, TDF_DETAILS);
}
void

View File

@ -2340,7 +2340,7 @@ rest_of_handle_jump2 (void)
delete_trivially_dead_insns (get_insns (), max_reg_num ());
reg_scan (get_insns (), max_reg_num ());
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_PRE_LOOP
| (flag_thread_jumps ? CLEANUP_THREADING : 0));

View File

@ -7844,7 +7844,7 @@ rest_of_handle_cse (void)
int tem;
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
reg_scan (get_insns (), max_reg_num ());
@ -7899,7 +7899,7 @@ rest_of_handle_cse2 (void)
int tem;
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
tem = cse_main (get_insns (), max_reg_num ());

View File

@ -438,7 +438,7 @@ life_analysis (int flags)
end_alias_analysis ();
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
/* Removing dead insns should have made jumptables really dead. */
delete_dead_jumptables ();
@ -4420,7 +4420,7 @@ recompute_reg_usage (void)
update_life_info (NULL, UPDATE_LIFE_LOCAL, PROP_REG_INFO | PROP_DEATH_NOTES);
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
}
struct tree_opt_pass pass_recompute_reg_usage =

View File

@ -674,7 +674,7 @@ gcse_main (rtx f ATTRIBUTE_UNUSED)
max_gcse_regno = max_reg_num ();
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
/* Return if there's nothing to do, or it is too expensive. */
if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
@ -6519,7 +6519,7 @@ bypass_jumps (void)
max_gcse_regno = max_reg_num ();
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
/* Return if there's nothing to do, or it is too expensive. */
if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1

View File

@ -3902,7 +3902,7 @@ rest_of_handle_if_conversion (void)
if (flag_if_conversion)
{
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
cleanup_cfg (CLEANUP_EXPENSIVE);
reg_scan (get_insns (), max_reg_num ());
if_convert (0);

View File

@ -2559,10 +2559,10 @@ rest_of_handle_local_alloc (void)
timevar_pop (TV_JUMP);
}
if (dump_enabled_p (pass_local_alloc.static_pass_number))
if (dump_file && (dump_flags & TDF_DETAILS))
{
timevar_push (TV_DUMP);
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
dump_local_alloc (dump_file);
timevar_pop (TV_DUMP);
}

View File

@ -168,7 +168,7 @@ static void
rtl_loop_init (void)
{
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
/* Initialize structures for layout changes. */
cfg_layout_initialize (0);
@ -215,7 +215,7 @@ rtl_loop_done (void)
delete_trivially_dead_insns (get_insns (), max_reg_num ());
reg_scan (get_insns (), max_reg_num ());
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
current_loops = NULL;
}

View File

@ -756,7 +756,7 @@ execute_todo (unsigned int flags)
{
if (dump_flags & TDF_SLIM)
print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
else if (curr_properties & PROP_cfg)
else if ((curr_properties & PROP_cfg) && (dump_flags & TDF_BLOCKS))
print_rtl_with_bb (dump_file, get_insns ());
else
print_rtl (dump_file, get_insns ());

View File

@ -465,7 +465,7 @@ compute_branch_probabilities (void)
}
}
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
total_num_passes += passes;
if (dump_file)
@ -1150,7 +1150,7 @@ branch_prob (void)
insert_insn_on_edge. */
cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0);
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
}
free_edge_list (el);

View File

@ -2048,7 +2048,7 @@ extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
extern void recompute_reg_usage (void);
extern void delete_dead_jumptables (void);
extern void print_rtl_with_bb (FILE *, rtx);
extern void dump_flow_info (FILE *);
extern void dump_flow_info (FILE *, int);
/* In expmed.c */
extern void init_expmed (void);

View File

@ -369,11 +369,11 @@ tracer (unsigned int flags)
cfg_layout_initialize (flags);
mark_dfs_back_edges ();
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
tail_duplicate ();
layout_superblocks ();
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
cfg_layout_finalize ();
/* Merge basic blocks in duplicated traces. */
@ -391,7 +391,7 @@ static void
rest_of_handle_tracer (void)
{
if (dump_file)
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
tracer (0);
cleanup_cfg (CLEANUP_EXPENSIVE);
reg_scan (get_insns (), max_reg_num ());

View File

@ -1067,7 +1067,7 @@ enable_rtl_dump_file (int letter)
if (letter == 'a')
letter = 0;
return dump_enable_all (TDF_RTL, letter) > 0;
return dump_enable_all (TDF_RTL | TDF_DETAILS | TDF_BLOCKS, letter) > 0;
}

View File

@ -2696,10 +2696,10 @@ variable_tracking_main (void)
vt_find_locations ();
vt_emit_notes ();
if (dump_file)
if (dump_file && (dump_flags & TDF_DETAILS))
{
dump_dataflow_sets ();
dump_flow_info (dump_file);
dump_flow_info (dump_file, dump_flags);
}
vt_finalize ();