* 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
+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>
* config/i386/sse.md (ssescalarmodesuffix): Add V8SI and V4DI.
/* If we have an abnormal predecessor, do not consider the
loop (not worth the problems). */
- FOR_EACH_EDGE (e, ei, header->preds)
- if (e->flags & EDGE_ABNORMAL)
- break;
- if (e)
+ if (bb_has_abnormal_pred (header))
continue;
FOR_EACH_EDGE (e, ei, header->preds)
/* Now see if there's a reachable block with an exceptional incoming
edge. */
FOR_EACH_BB (bb)
- if (bb->flags & BB_REACHABLE)
- FOR_EACH_EDGE (e, ei, bb->preds)
- if (e->flags & EDGE_ABNORMAL)
- return true;
+ if (bb->flags & BB_REACHABLE && bb_has_abnormal_pred (bb))
+ return true;
/* No exceptional block reached exit unexceptionally. */
return false;
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
those alternatives are equal in each of the PHI nodes, then return
true, else return false. */
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. */
- if (has_abnormal_incoming_edge_p (bb)
- && (has_abnormal_incoming_edge_p (dest)
+ if (bb_has_abnormal_pred (bb)
+ && (bb_has_abnormal_pred (dest)
|| !gimple_seq_empty_p (phi_nodes (dest))))
return false;
if (gimple_seq_empty_p (phi_nodes (dest))
/* We don't want to deal with a basic block with
abnormal edges. */
- || has_abnormal_incoming_edge_p (bb))
+ || bb_has_abnormal_pred (bb))
continue;
if (!dominated_by_p (CDI_DOMINATORS, dest, bb))
/* Mark the LHS if any of the arguments flows through an abnormal
edge. */
- is_abnormal_phi = false;
- FOR_EACH_EDGE (e, ei, bb->preds)
- if (e->flags & EDGE_ABNORMAL)
- {
- is_abnormal_phi = true;
- break;
- }
+ is_abnormal_phi = bb_has_abnormal_pred (bb);
/* 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
basic_block bb = gimple_bb (stmt);
/* If needed, mark NEW_NAME as occurring in an abnormal PHI node. */
- FOR_EACH_EDGE (e, ei, bb->preds)
- if (e->flags & EDGE_ABNORMAL)
- {
- SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_name) = 1;
- break;
- }
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_name) = bb_has_abnormal_pred (bb);
}
register_new_name_mapping (new_name, old_name);