summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-19 00:32:41 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-19 00:32:41 +0000
commit9858d888671294ad272204b0ace61e31c3cd4a0f (patch)
tree78ce9f32b952d51f37e0689307e730753fca369a /gcc/bb-reorder.c
parent61b95acf6367657e1467eba76f668560a1ae5824 (diff)
downloadgcc-9858d888671294ad272204b0ace61e31c3cd4a0f.tar.gz
* basic-block.h (struct edge_def): Remove crossing_edge.
(EDGE_CROSSING): New define. (EDGE_ALL_FLAGS): Update. * bb-reorder.c (find_traces_1_round, better_edge_p, find_rarely_executed_basic_blocks_and_cr, fix_up_fall_thru_edges, find_jump_block, fix_crossing_conditional_branches, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Replace all occurences of crossing_edge with an edge flag check or set/reset. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, try_crossjump_bb): Likewise. * cfglayout.c (fixup_reorder_chain): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect, commit_one_edge_insertion): Likewise. * Makefile.in (cfganal.o): Depend on TIMEVAR_H. * tree-flow.h (compute_dominance_frontiers): Move prototype... * basic-block.h: ...here. * tree-cfg.c (compute_dominance_frontiers_1, compute_dominance_frontiers): Move from here... * cfganal.c: ...to here. Include timevar.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86228 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 32234b103f5..f4c486009a5 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -688,7 +688,7 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th,
&& !(e->flags & EDGE_COMPLEX)
&& !e->dest->rbi->visited
&& !e->dest->pred->pred_next
- && !e->crossing_edge
+ && !(e->flags & EDGE_CROSSING)
&& e->dest->succ
&& (e->dest->succ->flags & EDGE_CAN_FALLTHRU)
&& !(e->dest->succ->flags & EDGE_COMPLEX)
@@ -880,8 +880,8 @@ better_edge_p (basic_block bb, edge e, int prob, int freq, int best_prob,
if (!is_better_edge
&& flag_reorder_blocks_and_partition
&& cur_best_edge
- && cur_best_edge->crossing_edge
- && !e->crossing_edge)
+ && (cur_best_edge->flags & EDGE_CROSSING)
+ && !(e->flags & EDGE_CROSSING))
is_better_edge = true;
return is_better_edge;
@@ -1304,7 +1304,7 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge *crossing_edges,
&& e->dest != EXIT_BLOCK_PTR
&& e->src->partition != e->dest->partition)
{
- e->crossing_edge = true;
+ e->flags |= EDGE_CROSSING;
if (i == *max_idx)
{
*max_idx *= 2;
@@ -1314,7 +1314,7 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge *crossing_edges,
crossing_edges[i++] = e;
}
else
- e->crossing_edge = false;
+ e->flags &= ~EDGE_CROSSING;
}
}
*n_crossing_edges = i;
@@ -1472,7 +1472,7 @@ fix_up_fall_thru_edges (void)
{
/* Check to see if the fall-thru edge is a crossing edge. */
- if (fall_thru->crossing_edge)
+ if (fall_thru->flags & EDGE_CROSSING)
{
/* The fall_thru edge crosses; now check the cond jump edge, if
it exists. */
@@ -1485,7 +1485,7 @@ fix_up_fall_thru_edges (void)
if (cond_jump)
{
- if (!cond_jump->crossing_edge)
+ if (!(cond_jump->flags & EDGE_CROSSING))
cond_jump_crosses = false;
/* We know the fall-thru edge crosses; if the cond
@@ -1513,8 +1513,8 @@ fix_up_fall_thru_edges (void)
e = fall_thru;
fall_thru = cond_jump;
cond_jump = e;
- cond_jump->crossing_edge = true;
- fall_thru->crossing_edge = false;
+ cond_jump->flags |= EDGE_CROSSING;
+ fall_thru->flags &= ~EDGE_CROSSING;
}
}
}
@@ -1537,7 +1537,7 @@ fix_up_fall_thru_edges (void)
partition as bb it's falling through from. */
new_bb->partition = cur_bb->partition;
- new_bb->succ->crossing_edge = true;
+ new_bb->succ->flags |= EDGE_CROSSING;
}
/* Add barrier after new jump */
@@ -1574,7 +1574,7 @@ find_jump_block (basic_block jump_dest)
rtx insn;
for (e = jump_dest->pred; e; e = e->pred_next)
- if (e->crossing_edge)
+ if (e->flags & EDGE_CROSSING)
{
basic_block src = e->src;
@@ -1643,9 +1643,9 @@ fix_crossing_conditional_branches (void)
/* We already took care of fall-through edges, so only one successor
can be a crossing edge. */
- if (succ1 && succ1->crossing_edge)
+ if (succ1 && (succ1->flags & EDGE_CROSSING))
crossing_edge = succ1;
- else if (succ2 && succ2->crossing_edge)
+ else if (succ2 && (succ2->flags & EDGE_CROSSING))
crossing_edge = succ2;
if (crossing_edge)
@@ -1758,8 +1758,8 @@ fix_crossing_conditional_branches (void)
else
new_edge = new_bb->succ;
- crossing_edge->crossing_edge = false;
- new_edge->crossing_edge = true;
+ crossing_edge->flags &= ~EDGE_CROSSING;
+ new_edge->flags |= EDGE_CROSSING;
}
}
}
@@ -1790,7 +1790,7 @@ fix_crossing_unconditional_branches (void)
this point, no crossing jumps should be conditional. */
if (JUMP_P (last_insn)
- && succ->crossing_edge)
+ && (succ->flags & EDGE_CROSSING))
{
rtx label2, table;
@@ -1858,7 +1858,7 @@ add_reg_crossing_jump_notes (void)
FOR_EACH_BB (bb)
for (e = bb->succ; e; e = e->succ_next)
- if (e->crossing_edge
+ if ((e->flags & EDGE_CROSSING)
&& JUMP_P (BB_END (e->src)))
REG_NOTES (BB_END (e->src)) = gen_rtx_EXPR_LIST (REG_CROSSING_JUMP,
NULL_RTX,