Commit b00843d2 by Dale Johannesen Committed by Dale Johannesen

profile.c (compute_branch_probabilities): Prevent crash with EH in RTL-based profiling.


2004-11-15  Dale Johannesen  <dalej@apple.com>

        * profile.c (compute_branch_probabilities):  Prevent
        crash with EH in RTL-based profiling.

From-SVN: r90711
parent 32f84e48
2004-11-15 Dale Johannesen <dalej@apple.com>
* profile.c (compute_branch_probabilities): Prevent
crash with EH in RTL-based profiling.
2004-11-16 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (verify_expr): Replace TREE_OPERAND with
......
......@@ -569,10 +569,13 @@ compute_branch_probabilities (void)
}
}
/* Otherwise try to preserve the existing REG_BR_PROB probabilities
tree based profile guessing put into code. */
tree based profile guessing put into code. BB can be the
ENTRY_BLOCK, and it can have multiple (fake) successors in
EH cases, but it still has no code; don't crash in this case. */
else if (profile_status == PROFILE_ABSENT
&& !ir_type ()
&& EDGE_COUNT (bb->succs) > 1
&& BB_END (bb)
&& (note = find_reg_note (BB_END (bb), REG_BR_PROB, 0)))
{
int prob = INTVAL (XEXP (note, 0));
......
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