diff options
| author | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-16 01:26:00 +0000 |
|---|---|---|
| committer | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-16 01:26:00 +0000 |
| commit | da14d5e5fb57ddd90cd1b6ff5f001aa09bd167eb (patch) | |
| tree | 82ac2ff37928b22b45e27ce54db8f8931281757a | |
| parent | 037ff4cc9d0106aa5cb24c067bdea7729d071f14 (diff) | |
| download | ppe42-gcc-da14d5e5fb57ddd90cd1b6ff5f001aa09bd167eb.tar.gz ppe42-gcc-da14d5e5fb57ddd90cd1b6ff5f001aa09bd167eb.zip | |
2004-11-15 Dale Johannesen <dalej@apple.com>
* profile.c (compute_branch_probabilities): Prevent
crash with EH in RTL-based profiling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90711 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/profile.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c508075ddf..eec443fad5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gcc/profile.c b/gcc/profile.c index 93d79d03b50..318defdafb0 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -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)); |

