summaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 3fcd8a40357..d96f677c989 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -89,7 +89,8 @@ can_delete_note_p (note)
rtx note;
{
return (NOTE_LINE_NUMBER (note) == NOTE_INSN_DELETED
- || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK);
+ || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK
+ || NOTE_LINE_NUMBER (note) == NOTE_INSN_PREDICTION);
}
/* True if a given label can be deleted. */
@@ -375,6 +376,16 @@ flow_delete_block_noexpunge (b)
and remove the associated NOTE_INSN_EH_REGION_BEG and
NOTE_INSN_EH_REGION_END notes. */
+ /* Get rid of all NOTE_INSN_PREDICTIONs hanging before the block. */
+
+ for (insn = PREV_INSN (b->head); insn; insn = PREV_INSN (insn))
+ {
+ if (GET_CODE (insn) != NOTE)
+ break;
+ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_PREDICTION)
+ NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
+ }
+
insn = b->head;
never_reached_warning (insn, b->end);