Commit 31ff2426 by Nathan Froyd Committed by Nathan Froyd

cfgloop.c (flow_loops_find): Call bb_has_abnormal_pred.

	* cfgloop.c (flow_loops_find): Call bb_has_abnormal_pred.
	* reload1.c (has_nonexceptional_receiver): Likewise.
	* tree-into-ssa.c (rewrite_update_enter_block): Likewise.
	(create_new_def_for): Likewise.
	* tree-cfgcleanup.c (remove_forwarder_block): Likewise.
	(merge_phi_nodes): Likewise.
	(has_abnormal_incoming_edge_p): Delete.

From-SVN: r165772
parent 2f7ba24e
2010-10-21 Nathan Froyd <froydnj@codesourcery.com>
* cfgloop.c (flow_loops_find): Call bb_has_abnormal_pred.
* reload1.c (has_nonexceptional_receiver): Likewise.
* tree-into-ssa.c (rewrite_update_enter_block): Likewise.
(create_new_def_for): Likewise.
* tree-cfgcleanup.c (remove_forwarder_block): Likewise.
(merge_phi_nodes): Likewise.
(has_abnormal_incoming_edge_p): Delete.
2010-10-21 H.J. Lu <hongjiu.lu@intel.com> 2010-10-21 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/sse.md (ssescalarmodesuffix): Add V8SI and V4DI. * config/i386/sse.md (ssescalarmodesuffix): Add V8SI and V4DI.
...@@ -410,10 +410,7 @@ flow_loops_find (struct loops *loops) ...@@ -410,10 +410,7 @@ flow_loops_find (struct loops *loops)
/* If we have an abnormal predecessor, do not consider the /* If we have an abnormal predecessor, do not consider the
loop (not worth the problems). */ loop (not worth the problems). */
FOR_EACH_EDGE (e, ei, header->preds) if (bb_has_abnormal_pred (header))
if (e->flags & EDGE_ABNORMAL)
break;
if (e)
continue; continue;
FOR_EACH_EDGE (e, ei, header->preds) FOR_EACH_EDGE (e, ei, header->preds)
......
...@@ -675,10 +675,8 @@ has_nonexceptional_receiver (void) ...@@ -675,10 +675,8 @@ has_nonexceptional_receiver (void)
/* Now see if there's a reachable block with an exceptional incoming /* Now see if there's a reachable block with an exceptional incoming
edge. */ edge. */
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
if (bb->flags & BB_REACHABLE) if (bb->flags & BB_REACHABLE && bb_has_abnormal_pred (bb))
FOR_EACH_EDGE (e, ei, bb->preds) return true;
if (e->flags & EDGE_ABNORMAL)
return true;
/* No exceptional block reached exit unexceptionally. */ /* No exceptional block reached exit unexceptionally. */
return false; return false;
......
...@@ -338,21 +338,6 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted) ...@@ -338,21 +338,6 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted)
return true; return true;
} }
/* Return true if BB has at least one abnormal incoming edge. */
static inline bool
has_abnormal_incoming_edge_p (basic_block bb)
{
edge e;
edge_iterator ei;
FOR_EACH_EDGE (e, ei, bb->preds)
if (e->flags & EDGE_ABNORMAL)
return true;
return false;
}
/* If all the PHI nodes in DEST have alternatives for E1 and E2 and /* If all the PHI nodes in DEST have alternatives for E1 and E2 and
those alternatives are equal in each of the PHI nodes, then return those alternatives are equal in each of the PHI nodes, then return
true, else return false. */ true, else return false. */
...@@ -418,8 +403,8 @@ remove_forwarder_block (basic_block bb) ...@@ -418,8 +403,8 @@ remove_forwarder_block (basic_block bb)
So if there is an abnormal edge to BB, proceed only if there is So if there is an abnormal edge to BB, proceed only if there is
no abnormal edge to DEST and there are no phi nodes in DEST. */ no abnormal edge to DEST and there are no phi nodes in DEST. */
if (has_abnormal_incoming_edge_p (bb) if (bb_has_abnormal_pred (bb)
&& (has_abnormal_incoming_edge_p (dest) && (bb_has_abnormal_pred (dest)
|| !gimple_seq_empty_p (phi_nodes (dest)))) || !gimple_seq_empty_p (phi_nodes (dest))))
return false; return false;
...@@ -990,7 +975,7 @@ merge_phi_nodes (void) ...@@ -990,7 +975,7 @@ merge_phi_nodes (void)
if (gimple_seq_empty_p (phi_nodes (dest)) if (gimple_seq_empty_p (phi_nodes (dest))
/* We don't want to deal with a basic block with /* We don't want to deal with a basic block with
abnormal edges. */ abnormal edges. */
|| has_abnormal_incoming_edge_p (bb)) || bb_has_abnormal_pred (bb))
continue; continue;
if (!dominated_by_p (CDI_DOMINATORS, dest, bb)) if (!dominated_by_p (CDI_DOMINATORS, dest, bb))
......
...@@ -2080,13 +2080,7 @@ rewrite_update_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, ...@@ -2080,13 +2080,7 @@ rewrite_update_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
/* Mark the LHS if any of the arguments flows through an abnormal /* Mark the LHS if any of the arguments flows through an abnormal
edge. */ edge. */
is_abnormal_phi = false; is_abnormal_phi = bb_has_abnormal_pred (bb);
FOR_EACH_EDGE (e, ei, bb->preds)
if (e->flags & EDGE_ABNORMAL)
{
is_abnormal_phi = true;
break;
}
/* If any of the PHI nodes is a replacement for a name in /* If any of the PHI nodes is a replacement for a name in
OLD_SSA_NAMES or it's one of the names in NEW_SSA_NAMES, then OLD_SSA_NAMES or it's one of the names in NEW_SSA_NAMES, then
...@@ -2843,12 +2837,7 @@ create_new_def_for (tree old_name, gimple stmt, def_operand_p def) ...@@ -2843,12 +2837,7 @@ create_new_def_for (tree old_name, gimple stmt, def_operand_p def)
basic_block bb = gimple_bb (stmt); basic_block bb = gimple_bb (stmt);
/* If needed, mark NEW_NAME as occurring in an abnormal PHI node. */ /* If needed, mark NEW_NAME as occurring in an abnormal PHI node. */
FOR_EACH_EDGE (e, ei, bb->preds) SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_name) = bb_has_abnormal_pred (bb);
if (e->flags & EDGE_ABNORMAL)
{
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_name) = 1;
break;
}
} }
register_new_name_mapping (new_name, old_name); register_new_name_mapping (new_name, old_name);
......
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