except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG notes for sjlj exceptions too.

* except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG
        notes for sjlj exceptions too.
        (expand_eh_region_end): Similarly for EH_REGION_END notes.
        (exception_optimize): Optimize EH regions for sjlj exceptions too.
        * final.c (final_scan_insn): Don't output labels for EH REGION
        notes if doing sjlj exceptions.

From-SVN: r16266
This commit is contained in:
Mike Stump 1997-11-02 04:43:34 +00:00 committed by Jeff Law
parent f8671389c5
commit 9ad8a5f011
3 changed files with 20 additions and 13 deletions

View File

@ -1,3 +1,12 @@
Sat Nov 1 21:43:00 1997 Mike Stump (mrs@wrs.com)
* except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG
notes for sjlj exceptions too.
(expand_eh_region_end): Similarly for EH_REGION_END notes.
(exception_optimize): Optimize EH regions for sjlj exceptions too.
* final.c (final_scan_insn): Don't output labels for EH REGION
notes if doing sjlj exceptions.
Sat Nov 1 19:15:28 1997 Jeffrey A Law (law@cygnus.com)
* flow.c (find_basic_blocks): If we delete the label for an

View File

@ -1032,12 +1032,10 @@ expand_eh_region_start_for_decl (decl)
expand_dhc_cleanup (decl);
}
if (exceptions_via_longjmp == 0)
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
push_eh_entry (&ehstack);
if (exceptions_via_longjmp == 0)
NOTE_BLOCK_NUMBER (note)
= CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label);
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
NOTE_BLOCK_NUMBER (note)
= CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label);
if (exceptions_via_longjmp)
start_dynamic_handler ();
}
@ -1066,17 +1064,19 @@ expand_eh_region_end (handler)
tree handler;
{
struct eh_entry *entry;
rtx note;
if (! doing_eh (0))
return;
entry = pop_eh_entry (&ehstack);
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END);
NOTE_BLOCK_NUMBER (note)
= CODE_LABEL_NUMBER (entry->exception_handler_label);
if (exceptions_via_longjmp == 0)
{
rtx label;
rtx note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END);
NOTE_BLOCK_NUMBER (note) = CODE_LABEL_NUMBER (entry->exception_handler_label);
label = gen_label_rtx ();
emit_jump (label);
@ -2136,10 +2136,6 @@ exception_optimize ()
rtx insn, regions = NULL_RTX;
int n;
/* The below doesn't apply to setjmp/longjmp EH. */
if (exceptions_via_longjmp)
return;
/* Remove empty regions. */
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{

View File

@ -1379,7 +1379,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END)
break;
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
&& ! exceptions_via_longjmp)
{
ASM_OUTPUT_INTERNAL_LABEL (file, "LEHB", NOTE_BLOCK_NUMBER (insn));
add_eh_table_entry (NOTE_BLOCK_NUMBER (insn));
@ -1389,7 +1390,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break;
}
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END
&& ! exceptions_via_longjmp)
{
ASM_OUTPUT_INTERNAL_LABEL (file, "LEHE", NOTE_BLOCK_NUMBER (insn));
#ifdef ASM_OUTPUT_EH_REGION_END