Commit 6531d1be by Bernhard Fischer Committed by Bernhard Reutner-Fischer

tree-cfg.c: Prune whitespace.

	* tree-cfg.c: Prune whitespace.
	(debug_tree_cfg): Point to correct header containing the
	TDF_* defines.

From-SVN: r113954
parent 95a52ebb
2006-05-21 Bernhard Fischer <aldot@gcc.gnu.org> 2006-05-21 Bernhard Fischer <aldot@gcc.gnu.org>
* tree-cfg.c: Prune whitespace.
(debug_tree_cfg): Point to correct header containing the
TDF_* defines.
2006-05-21 Bernhard Fischer <aldot@gcc.gnu.org>
PR middle-end/25776 PR middle-end/25776
* cgraphunit.c (verify_cgraph_node): Typo in error message. * cgraphunit.c (verify_cgraph_node): Typo in error message.
......
...@@ -247,9 +247,9 @@ struct tree_opt_pass pass_build_cfg = ...@@ -247,9 +247,9 @@ struct tree_opt_pass pass_build_cfg =
0 /* letter */ 0 /* letter */
}; };
/* Search the CFG for any computed gotos. If found, factor them to a /* Search the CFG for any computed gotos. If found, factor them to a
common computed goto site. Also record the location of that site so common computed goto site. Also record the location of that site so
that we can un-factor the gotos after we have converted back to that we can un-factor the gotos after we have converted back to
normal form. */ normal form. */
static void static void
...@@ -264,7 +264,7 @@ factor_computed_gotos (void) ...@@ -264,7 +264,7 @@ factor_computed_gotos (void)
/* We know there are one or more computed gotos in this function. /* We know there are one or more computed gotos in this function.
Examine the last statement in each basic block to see if the block Examine the last statement in each basic block to see if the block
ends with a computed goto. */ ends with a computed goto. */
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
{ {
block_stmt_iterator bsi = bsi_last (bb); block_stmt_iterator bsi = bsi_last (bb);
...@@ -565,7 +565,7 @@ make_edges (void) ...@@ -565,7 +565,7 @@ make_edges (void)
} }
} }
break; break;
default: default:
gcc_unreachable (); gcc_unreachable ();
} }
...@@ -658,7 +658,7 @@ edge_to_cases_eq (const void *p1, const void *p2) ...@@ -658,7 +658,7 @@ edge_to_cases_eq (const void *p1, const void *p2)
/* Called for each element in the hash table (P) as we delete the /* Called for each element in the hash table (P) as we delete the
edge to cases hash table. edge to cases hash table.
Clear all the TREE_CHAINs to prevent problems with copying of Clear all the TREE_CHAINs to prevent problems with copying of
SWITCH_EXPRs and structure sharing rules, then free the hash table SWITCH_EXPRs and structure sharing rules, then free the hash table
element. */ element. */
...@@ -759,7 +759,7 @@ get_cases_for_edge (edge e, tree t) ...@@ -759,7 +759,7 @@ get_cases_for_edge (edge e, tree t)
chains available. Return NULL so the caller can detect this case. */ chains available. Return NULL so the caller can detect this case. */
if (!recording_case_labels_p ()) if (!recording_case_labels_p ())
return NULL; return NULL;
restart: restart:
elt.e = e; elt.e = e;
elt.case_labels = NULL; elt.case_labels = NULL;
...@@ -821,7 +821,7 @@ label_to_block_fn (struct function *ifun, tree dest) ...@@ -821,7 +821,7 @@ label_to_block_fn (struct function *ifun, tree dest)
and undefined variable warnings quite right. */ and undefined variable warnings quite right. */
if ((errorcount || sorrycount) && uid < 0) if ((errorcount || sorrycount) && uid < 0)
{ {
block_stmt_iterator bsi = block_stmt_iterator bsi =
bsi_start (BASIC_BLOCK (NUM_FIXED_BLOCKS)); bsi_start (BASIC_BLOCK (NUM_FIXED_BLOCKS));
tree stmt; tree stmt;
...@@ -1025,13 +1025,13 @@ cleanup_dead_labels (void) ...@@ -1025,13 +1025,13 @@ cleanup_dead_labels (void)
break; break;
} }
case SWITCH_EXPR: case SWITCH_EXPR:
{ {
size_t i; size_t i;
tree vec = SWITCH_LABELS (stmt); tree vec = SWITCH_LABELS (stmt);
size_t n = TREE_VEC_LENGTH (vec); size_t n = TREE_VEC_LENGTH (vec);
/* Replace all destination labels. */ /* Replace all destination labels. */
for (i = 0; i < n; ++i) for (i = 0; i < n; ++i)
{ {
...@@ -1111,7 +1111,7 @@ group_case_labels (void) ...@@ -1111,7 +1111,7 @@ group_case_labels (void)
int old_size = TREE_VEC_LENGTH (labels); int old_size = TREE_VEC_LENGTH (labels);
int i, j, new_size = old_size; int i, j, new_size = old_size;
tree default_case = TREE_VEC_ELT (labels, old_size - 1); tree default_case = TREE_VEC_ELT (labels, old_size - 1);
tree default_label; tree default_label;
/* The default label is always the last case in a switch /* The default label is always the last case in a switch
statement after gimplification. */ statement after gimplification. */
...@@ -1205,7 +1205,7 @@ tree_can_merge_blocks_p (basic_block a, basic_block b) ...@@ -1205,7 +1205,7 @@ tree_can_merge_blocks_p (basic_block a, basic_block b)
if (b == EXIT_BLOCK_PTR) if (b == EXIT_BLOCK_PTR)
return false; return false;
/* If A ends by a statement causing exceptions or something similar, we /* If A ends by a statement causing exceptions or something similar, we
cannot merge the blocks. */ cannot merge the blocks. */
stmt = last_stmt (a); stmt = last_stmt (a);
...@@ -1293,7 +1293,7 @@ replace_uses_by (tree name, tree val) ...@@ -1293,7 +1293,7 @@ replace_uses_by (tree name, tree val)
mark_new_vars_to_rename (stmt); mark_new_vars_to_rename (stmt);
} }
} }
gcc_assert (num_imm_uses (name) == 0); gcc_assert (num_imm_uses (name) == 0);
/* Also update the trees stored in loop structures. */ /* Also update the trees stored in loop structures. */
...@@ -1402,24 +1402,23 @@ tree_merge_blocks (basic_block a, basic_block b) ...@@ -1402,24 +1402,23 @@ tree_merge_blocks (basic_block a, basic_block b)
reached by a complex edge, if there is one. Else, return BB. We use reached by a complex edge, if there is one. Else, return BB. We use
this in optimizations that use post-dominators for their heuristics, this in optimizations that use post-dominators for their heuristics,
to catch the cases in C++ where function calls are involved. */ to catch the cases in C++ where function calls are involved. */
basic_block basic_block
single_noncomplex_succ (basic_block bb) single_noncomplex_succ (basic_block bb)
{ {
edge e0, e1; edge e0, e1;
if (EDGE_COUNT (bb->succs) != 2) if (EDGE_COUNT (bb->succs) != 2)
return bb; return bb;
e0 = EDGE_SUCC (bb, 0); e0 = EDGE_SUCC (bb, 0);
e1 = EDGE_SUCC (bb, 1); e1 = EDGE_SUCC (bb, 1);
if (e0->flags & EDGE_COMPLEX) if (e0->flags & EDGE_COMPLEX)
return e1->dest; return e1->dest;
if (e1->flags & EDGE_COMPLEX) if (e1->flags & EDGE_COMPLEX)
return e0->dest; return e0->dest;
return bb; return bb;
} }
/* Walk the function tree removing unnecessary statements. /* Walk the function tree removing unnecessary statements.
...@@ -1798,7 +1797,7 @@ remove_useless_stmts_label (tree *stmt_p, struct rus_data *data) ...@@ -1798,7 +1797,7 @@ remove_useless_stmts_label (tree *stmt_p, struct rus_data *data)
/* If the function is "const" or "pure", then clear TREE_SIDE_EFFECTS on its /* If the function is "const" or "pure", then clear TREE_SIDE_EFFECTS on its
decl. This allows us to eliminate redundant or useless decl. This allows us to eliminate redundant or useless
calls to "const" functions. calls to "const" functions.
Gimplifier already does the same operation, but we may notice functions Gimplifier already does the same operation, but we may notice functions
being const and pure once their calls has been gimplified, so we need being const and pure once their calls has been gimplified, so we need
...@@ -1912,7 +1911,7 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) ...@@ -1912,7 +1911,7 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data)
tsi_delink (&i); tsi_delink (&i);
continue; continue;
} }
remove_useless_stmts_1 (tsi_stmt_ptr (i), data); remove_useless_stmts_1 (tsi_stmt_ptr (i), data);
t = tsi_stmt (i); t = tsi_stmt (i);
...@@ -1954,7 +1953,7 @@ remove_useless_stmts (void) ...@@ -1954,7 +1953,7 @@ remove_useless_stmts (void)
} }
struct tree_opt_pass pass_remove_useless_stmts = struct tree_opt_pass pass_remove_useless_stmts =
{ {
"useless", /* name */ "useless", /* name */
NULL, /* gate */ NULL, /* gate */
...@@ -2055,7 +2054,7 @@ remove_bb (basic_block bb) ...@@ -2055,7 +2054,7 @@ remove_bb (basic_block bb)
DECL_NONLOCAL (LABEL_EXPR_LABEL (stmt)) = 0; DECL_NONLOCAL (LABEL_EXPR_LABEL (stmt)) = 0;
FORCED_LABEL (LABEL_EXPR_LABEL (stmt)) = 1; FORCED_LABEL (LABEL_EXPR_LABEL (stmt)) = 1;
} }
new_bb = bb->prev_bb; new_bb = bb->prev_bb;
new_bsi = bsi_start (new_bb); new_bsi = bsi_start (new_bb);
bsi_remove (&i, false); bsi_remove (&i, false);
...@@ -2167,7 +2166,7 @@ find_taken_edge_cond_expr (basic_block bb, tree val) ...@@ -2167,7 +2166,7 @@ find_taken_edge_cond_expr (basic_block bb, tree val)
edge true_edge, false_edge; edge true_edge, false_edge;
extract_true_false_edges_from_block (bb, &true_edge, &false_edge); extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
gcc_assert (TREE_CODE (val) == INTEGER_CST); gcc_assert (TREE_CODE (val) == INTEGER_CST);
return (zero_p (val) ? false_edge : true_edge); return (zero_p (val) ? false_edge : true_edge);
} }
...@@ -2267,13 +2266,13 @@ debug_tree_bb_n (int n) ...@@ -2267,13 +2266,13 @@ debug_tree_bb_n (int n)
{ {
debug_tree_bb (BASIC_BLOCK (n)); debug_tree_bb (BASIC_BLOCK (n));
return BASIC_BLOCK (n); return BASIC_BLOCK (n);
} }
/* Dump the CFG on stderr. /* Dump the CFG on stderr.
FLAGS are the same used by the tree dumping functions FLAGS are the same used by the tree dumping functions
(see TDF_* in tree.h). */ (see TDF_* in tree-pass.h). */
void void
debug_tree_cfg (int flags) debug_tree_cfg (int flags)
...@@ -2838,7 +2837,7 @@ bsi_insert_after (block_stmt_iterator *i, tree t, enum bsi_iterator_update m) ...@@ -2838,7 +2837,7 @@ bsi_insert_after (block_stmt_iterator *i, tree t, enum bsi_iterator_update m)
/* Remove the statement pointed to by iterator I. The iterator is updated /* Remove the statement pointed to by iterator I. The iterator is updated
to the next statement. to the next statement.
When REMOVE_EH_INFO is true we remove the statement pointed to by When REMOVE_EH_INFO is true we remove the statement pointed to by
iterator I from the EH tables. Otherwise we do not modify the EH iterator I from the EH tables. Otherwise we do not modify the EH
...@@ -2862,18 +2861,18 @@ bsi_remove (block_stmt_iterator *i, bool remove_eh_info) ...@@ -2862,18 +2861,18 @@ bsi_remove (block_stmt_iterator *i, bool remove_eh_info)
/* Move the statement at FROM so it comes right after the statement at TO. */ /* Move the statement at FROM so it comes right after the statement at TO. */
void void
bsi_move_after (block_stmt_iterator *from, block_stmt_iterator *to) bsi_move_after (block_stmt_iterator *from, block_stmt_iterator *to)
{ {
tree stmt = bsi_stmt (*from); tree stmt = bsi_stmt (*from);
bsi_remove (from, false); bsi_remove (from, false);
bsi_insert_after (to, stmt, BSI_SAME_STMT); bsi_insert_after (to, stmt, BSI_SAME_STMT);
} }
/* Move the statement at FROM so it comes right before the statement at TO. */ /* Move the statement at FROM so it comes right before the statement at TO. */
void void
bsi_move_before (block_stmt_iterator *from, block_stmt_iterator *to) bsi_move_before (block_stmt_iterator *from, block_stmt_iterator *to)
{ {
tree stmt = bsi_stmt (*from); tree stmt = bsi_stmt (*from);
...@@ -2888,7 +2887,7 @@ void ...@@ -2888,7 +2887,7 @@ void
bsi_move_to_bb_end (block_stmt_iterator *from, basic_block bb) bsi_move_to_bb_end (block_stmt_iterator *from, basic_block bb)
{ {
block_stmt_iterator last = bsi_last (bb); block_stmt_iterator last = bsi_last (bb);
/* Have to check bsi_end_p because it could be an empty block. */ /* Have to check bsi_end_p because it could be an empty block. */
if (!bsi_end_p (last) && is_ctrl_stmt (bsi_stmt (last))) if (!bsi_end_p (last) && is_ctrl_stmt (bsi_stmt (last)))
bsi_move_before (from, &last); bsi_move_before (from, &last);
...@@ -2900,7 +2899,6 @@ bsi_move_to_bb_end (block_stmt_iterator *from, basic_block bb) ...@@ -2900,7 +2899,6 @@ bsi_move_to_bb_end (block_stmt_iterator *from, basic_block bb)
/* Replace the contents of the statement pointed to by iterator BSI /* Replace the contents of the statement pointed to by iterator BSI
with STMT. If UPDATE_EH_INFO is true, the exception handling with STMT. If UPDATE_EH_INFO is true, the exception handling
information of the original statement is moved to the new statement. */ information of the original statement is moved to the new statement. */
void void
bsi_replace (const block_stmt_iterator *bsi, tree stmt, bool update_eh_info) bsi_replace (const block_stmt_iterator *bsi, tree stmt, bool update_eh_info)
...@@ -2951,7 +2949,7 @@ tree_find_edge_insert_loc (edge e, block_stmt_iterator *bsi, ...@@ -2951,7 +2949,7 @@ tree_find_edge_insert_loc (edge e, block_stmt_iterator *bsi,
restart: restart:
/* If the destination has one predecessor which has no PHI nodes, /* If the destination has one predecessor which has no PHI nodes,
insert there. Except for the exit block. insert there. Except for the exit block.
The requirement for no PHI nodes could be relaxed. Basically we The requirement for no PHI nodes could be relaxed. Basically we
would have to examine the PHIs to prove that none of them used would have to examine the PHIs to prove that none of them used
...@@ -3107,7 +3105,7 @@ reinstall_phi_args (edge new_edge, edge old_edge) ...@@ -3107,7 +3105,7 @@ reinstall_phi_args (edge new_edge, edge old_edge)
if (!PENDING_STMT (old_edge)) if (!PENDING_STMT (old_edge))
return; return;
for (var = PENDING_STMT (old_edge), phi = phi_nodes (new_edge->dest); for (var = PENDING_STMT (old_edge), phi = phi_nodes (new_edge->dest);
var && phi; var && phi;
var = TREE_CHAIN (var), phi = PHI_CHAIN (phi)) var = TREE_CHAIN (var), phi = PHI_CHAIN (phi))
...@@ -3202,7 +3200,7 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) ...@@ -3202,7 +3200,7 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
if (TYPE_P (t)) if (TYPE_P (t))
*walk_subtrees = 0; *walk_subtrees = 0;
/* Check operand N for being valid GIMPLE and give error MSG if not. */ /* Check operand N for being valid GIMPLE and give error MSG if not. */
#define CHECK_OP(N, MSG) \ #define CHECK_OP(N, MSG) \
do { if (!is_gimple_val (TREE_OPERAND (t, N))) \ do { if (!is_gimple_val (TREE_OPERAND (t, N))) \
...@@ -3793,11 +3791,11 @@ tree_verify_flow_info (void) ...@@ -3793,11 +3791,11 @@ tree_verify_flow_info (void)
if (simple_goto_p (stmt)) if (simple_goto_p (stmt))
{ {
error ("explicit goto at end of bb %d", bb->index); error ("explicit goto at end of bb %d", bb->index);
err = 1; err = 1;
} }
else else
{ {
/* FIXME. We should double check that the labels in the /* FIXME. We should double check that the labels in the
destination blocks have their address taken. */ destination blocks have their address taken. */
FOR_EACH_EDGE (e, ei, bb->succs) FOR_EACH_EDGE (e, ei, bb->succs)
if ((e->flags & (EDGE_FALLTHRU | EDGE_TRUE_VALUE if ((e->flags & (EDGE_FALLTHRU | EDGE_TRUE_VALUE
...@@ -4049,7 +4047,7 @@ tree_redirect_edge_and_branch (edge e, basic_block dest) ...@@ -4049,7 +4047,7 @@ tree_redirect_edge_and_branch (edge e, basic_block dest)
if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH)) if (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
return NULL; return NULL;
if (e->src != ENTRY_BLOCK_PTR if (e->src != ENTRY_BLOCK_PTR
&& (ret = tree_try_redirect_by_replacing_jump (e, dest))) && (ret = tree_try_redirect_by_replacing_jump (e, dest)))
return ret; return ret;
...@@ -4296,7 +4294,7 @@ add_phi_args_after_copy_bb (basic_block bb_copy) ...@@ -4296,7 +4294,7 @@ add_phi_args_after_copy_bb (basic_block bb_copy)
edge e, e_copy; edge e, e_copy;
edge_iterator ei; edge_iterator ei;
tree phi, phi_copy, phi_next, def; tree phi, phi_copy, phi_next, def;
bb = get_bb_original (bb_copy); bb = get_bb_original (bb_copy);
FOR_EACH_EDGE (e_copy, ei, bb_copy->succs) FOR_EACH_EDGE (e_copy, ei, bb_copy->succs)
...@@ -4458,7 +4456,7 @@ tree_duplicate_sese_region (edge entry, edge exit, ...@@ -4458,7 +4456,7 @@ tree_duplicate_sese_region (edge entry, edge exit,
total_count - entry_count, total_count - entry_count,
total_count); total_count);
scale_bbs_frequencies_gcov_type (region_copy, n_region, entry_count, scale_bbs_frequencies_gcov_type (region_copy, n_region, entry_count,
total_count); total_count);
} }
else else
{ {
...@@ -4610,7 +4608,7 @@ move_stmt_r (tree *tp, int *walk_subtrees, void *data) ...@@ -4610,7 +4608,7 @@ move_stmt_r (tree *tp, int *walk_subtrees, void *data)
original array of blocks and placed in DEST_FN's array of blocks. original array of blocks and placed in DEST_FN's array of blocks.
If UPDATE_EDGE_COUNT_P is true, the edge counts on both CFGs is If UPDATE_EDGE_COUNT_P is true, the edge counts on both CFGs is
updated to reflect the moved edges. updated to reflect the moved edges.
On exit, local variables that need to be removed from On exit, local variables that need to be removed from
CFUN->UNEXPANDED_VAR_LIST will have been added to VARS_TO_REMOVE. */ CFUN->UNEXPANDED_VAR_LIST will have been added to VARS_TO_REMOVE. */
...@@ -4728,7 +4726,7 @@ find_outermost_region_in_block (struct function *src_cfun, ...@@ -4728,7 +4726,7 @@ find_outermost_region_in_block (struct function *src_cfun,
basic_block bb, int region) basic_block bb, int region)
{ {
block_stmt_iterator si; block_stmt_iterator si;
for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si)) for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
{ {
tree stmt = bsi_stmt (si); tree stmt = bsi_stmt (si);
...@@ -4971,7 +4969,7 @@ dump_function_to_file (tree fn, FILE *file, int flags) ...@@ -4971,7 +4969,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
basic_block bb; basic_block bb;
tree chain; tree chain;
struct function *saved_cfun; struct function *saved_cfun;
fprintf (file, "%s (", lang_hooks.decl_printable_name (fn, 2)); fprintf (file, "%s (", lang_hooks.decl_printable_name (fn, 2));
arg = DECL_ARGUMENTS (fn); arg = DECL_ARGUMENTS (fn);
...@@ -5026,7 +5024,7 @@ dump_function_to_file (tree fn, FILE *file, int flags) ...@@ -5026,7 +5024,7 @@ dump_function_to_file (tree fn, FILE *file, int flags)
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
dump_generic_bb (file, bb, 2, flags); dump_generic_bb (file, bb, 2, flags);
fprintf (file, "}\n"); fprintf (file, "}\n");
check_bb_profile (EXIT_BLOCK_PTR, file); check_bb_profile (EXIT_BLOCK_PTR, file);
} }
...@@ -5117,7 +5115,7 @@ print_loop (FILE *file, struct loop *loop, int indent) ...@@ -5117,7 +5115,7 @@ print_loop (FILE *file, struct loop *loop, int indent)
{ {
char *s_indent; char *s_indent;
basic_block bb; basic_block bb;
if (loop == NULL) if (loop == NULL)
return; return;
...@@ -5127,7 +5125,7 @@ print_loop (FILE *file, struct loop *loop, int indent) ...@@ -5127,7 +5125,7 @@ print_loop (FILE *file, struct loop *loop, int indent)
/* Print the loop's header. */ /* Print the loop's header. */
fprintf (file, "%sloop_%d\n", s_indent, loop->num); fprintf (file, "%sloop_%d\n", s_indent, loop->num);
/* Print the loop's body. */ /* Print the loop's body. */
fprintf (file, "%s{\n", s_indent); fprintf (file, "%s{\n", s_indent);
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
...@@ -5139,13 +5137,13 @@ print_loop (FILE *file, struct loop *loop, int indent) ...@@ -5139,13 +5137,13 @@ print_loop (FILE *file, struct loop *loop, int indent)
fprintf (file, "}, succs = {"); fprintf (file, "}, succs = {");
print_succ_bbs (file, bb); print_succ_bbs (file, bb);
fprintf (file, "})\n"); fprintf (file, "})\n");
/* Print the basic_block's body. */ /* Print the basic_block's body. */
fprintf (file, "%s {\n", s_indent); fprintf (file, "%s {\n", s_indent);
tree_dump_bb (bb, file, indent + 4); tree_dump_bb (bb, file, indent + 4);
fprintf (file, "%s }\n", s_indent); fprintf (file, "%s }\n", s_indent);
} }
print_loop (file, loop->inner, indent + 2); print_loop (file, loop->inner, indent + 2);
fprintf (file, "%s}\n", s_indent); fprintf (file, "%s}\n", s_indent);
print_loop (file, loop->next, indent); print_loop (file, loop->next, indent);
...@@ -5155,11 +5153,11 @@ print_loop (FILE *file, struct loop *loop, int indent) ...@@ -5155,11 +5153,11 @@ print_loop (FILE *file, struct loop *loop, int indent)
/* Follow a CFG edge from the entry point of the program, and on entry /* Follow a CFG edge from the entry point of the program, and on entry
of a loop, pretty print the loop structure on FILE. */ of a loop, pretty print the loop structure on FILE. */
void void
print_loop_ir (FILE *file) print_loop_ir (FILE *file)
{ {
basic_block bb; basic_block bb;
bb = BASIC_BLOCK (NUM_FIXED_BLOCKS); bb = BASIC_BLOCK (NUM_FIXED_BLOCKS);
if (bb && bb->loop_father) if (bb && bb->loop_father)
print_loop (file, bb->loop_father, 0); print_loop (file, bb->loop_father, 0);
...@@ -5168,7 +5166,7 @@ print_loop_ir (FILE *file) ...@@ -5168,7 +5166,7 @@ print_loop_ir (FILE *file)
/* Debugging loops structure at tree level. */ /* Debugging loops structure at tree level. */
void void
debug_loop_ir (void) debug_loop_ir (void)
{ {
print_loop_ir (stderr); print_loop_ir (stderr);
...@@ -5433,8 +5431,8 @@ tree_execute_on_shrinking_pred (edge e) ...@@ -5433,8 +5431,8 @@ tree_execute_on_shrinking_pred (edge e)
of 'first'. Both of them are dominated by 'new_head' basic block. When of 'first'. Both of them are dominated by 'new_head' basic block. When
'new_head' was created by 'second's incoming edge it received phi arguments 'new_head' was created by 'second's incoming edge it received phi arguments
on the edge by split_edge(). Later, additional edge 'e' was created to on the edge by split_edge(). Later, additional edge 'e' was created to
connect 'new_head' and 'first'. Now this routine adds phi args on this connect 'new_head' and 'first'. Now this routine adds phi args on this
additional edge 'e' that new_head to second edge received as part of edge additional edge 'e' that new_head to second edge received as part of edge
splitting. splitting.
*/ */
...@@ -5452,8 +5450,8 @@ tree_lv_adjust_loop_header_phi (basic_block first, basic_block second, ...@@ -5452,8 +5450,8 @@ tree_lv_adjust_loop_header_phi (basic_block first, basic_block second,
/* Browse all 'second' basic block phi nodes and add phi args to /* Browse all 'second' basic block phi nodes and add phi args to
edge 'e' for 'first' head. PHI args are always in correct order. */ edge 'e' for 'first' head. PHI args are always in correct order. */
for (phi2 = phi_nodes (second), phi1 = phi_nodes (first); for (phi2 = phi_nodes (second), phi1 = phi_nodes (first);
phi2 && phi1; phi2 && phi1;
phi2 = PHI_CHAIN (phi2), phi1 = PHI_CHAIN (phi1)) phi2 = PHI_CHAIN (phi2), phi1 = PHI_CHAIN (phi1))
{ {
tree def = PHI_ARG_DEF (phi2, e2->dest_idx); tree def = PHI_ARG_DEF (phi2, e2->dest_idx);
...@@ -5461,8 +5459,8 @@ tree_lv_adjust_loop_header_phi (basic_block first, basic_block second, ...@@ -5461,8 +5459,8 @@ tree_lv_adjust_loop_header_phi (basic_block first, basic_block second,
} }
} }
/* Adds a if else statement to COND_BB with condition COND_EXPR. /* Adds a if else statement to COND_BB with condition COND_EXPR.
SECOND_HEAD is the destination of the THEN and FIRST_HEAD is SECOND_HEAD is the destination of the THEN and FIRST_HEAD is
the destination of the ELSE part. */ the destination of the ELSE part. */
static void static void
tree_lv_add_condition_to_bb (basic_block first_head, basic_block second_head, tree_lv_add_condition_to_bb (basic_block first_head, basic_block second_head,
...@@ -5480,8 +5478,8 @@ tree_lv_add_condition_to_bb (basic_block first_head, basic_block second_head, ...@@ -5480,8 +5478,8 @@ tree_lv_add_condition_to_bb (basic_block first_head, basic_block second_head,
goto2 = build1 (GOTO_EXPR, void_type_node, tree_block_label (second_head)); goto2 = build1 (GOTO_EXPR, void_type_node, tree_block_label (second_head));
new_cond_expr = build3 (COND_EXPR, void_type_node, cond_expr, goto1, goto2); new_cond_expr = build3 (COND_EXPR, void_type_node, cond_expr, goto1, goto2);
/* Add new cond in cond_bb. */ /* Add new cond in cond_bb. */
bsi = bsi_start (cond_bb); bsi = bsi_start (cond_bb);
bsi_insert_after (&bsi, new_cond_expr, BSI_NEW_STMT); bsi_insert_after (&bsi, new_cond_expr, BSI_NEW_STMT);
/* Adjust edges appropriately to connect new head with first head /* Adjust edges appropriately to connect new head with first head
as well as second head. */ as well as second head. */
...@@ -5518,7 +5516,7 @@ struct cfg_hooks tree_cfg_hooks = { ...@@ -5518,7 +5516,7 @@ struct cfg_hooks tree_cfg_hooks = {
tree_lv_add_condition_to_bb, /* lv_add_condition_to_bb */ tree_lv_add_condition_to_bb, /* lv_add_condition_to_bb */
tree_lv_adjust_loop_header_phi, /* lv_adjust_loop_header_phi*/ tree_lv_adjust_loop_header_phi, /* lv_adjust_loop_header_phi*/
extract_true_false_edges_from_block, /* extract_cond_bb_edges */ extract_true_false_edges_from_block, /* extract_cond_bb_edges */
flush_pending_stmts /* flush_pending_stmts */ flush_pending_stmts /* flush_pending_stmts */
}; };
...@@ -5547,7 +5545,7 @@ split_critical_edges (void) ...@@ -5547,7 +5545,7 @@ split_critical_edges (void)
return 0; return 0;
} }
struct tree_opt_pass pass_split_crit_edges = struct tree_opt_pass pass_split_crit_edges =
{ {
"crited", /* name */ "crited", /* name */
NULL, /* gate */ NULL, /* gate */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment