diff options
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 06721c6c467..eabf88f646d 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3677,80 +3677,6 @@ find_line_note (rtx insn) return insn; } -/* Remove unnecessary notes from the instruction stream. */ - -unsigned int -remove_unnecessary_notes (void) -{ - rtx eh_stack = NULL_RTX; - rtx insn; - rtx next; - rtx tmp; - - /* We must not remove the first instruction in the function because - the compiler depends on the first instruction being a note. */ - for (insn = NEXT_INSN (get_insns ()); insn; insn = next) - { - /* Remember what's next. */ - next = NEXT_INSN (insn); - - /* We're only interested in notes. */ - if (!NOTE_P (insn)) - continue; - - switch (NOTE_LINE_NUMBER (insn)) - { - case NOTE_INSN_DELETED: - remove_insn (insn); - break; - - case NOTE_INSN_EH_REGION_BEG: - eh_stack = alloc_INSN_LIST (insn, eh_stack); - break; - - case NOTE_INSN_EH_REGION_END: - /* Too many end notes. */ - gcc_assert (eh_stack); - /* Mismatched nesting. */ - gcc_assert (NOTE_EH_HANDLER (XEXP (eh_stack, 0)) - == NOTE_EH_HANDLER (insn)); - tmp = eh_stack; - eh_stack = XEXP (eh_stack, 1); - free_INSN_LIST_node (tmp); - break; - - case NOTE_INSN_BLOCK_BEG: - case NOTE_INSN_BLOCK_END: - /* BLOCK_END and BLOCK_BEG notes only exist in the `final' pass. */ - gcc_unreachable (); - - default: - break; - } - } - - /* Too many EH_REGION_BEG notes. */ - gcc_assert (!eh_stack); - return 0; -} - -struct tree_opt_pass pass_remove_unnecessary_notes = -{ - "eunotes", /* name */ - NULL, /* gate */ - remove_unnecessary_notes, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - 0, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_dump_func, /* todo_flags_finish */ - 0 /* letter */ -}; - /* Emit insn(s) of given code and pattern at a specified place within the doubly-linked list. |