except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG notes for sjlj excepti...
authorMike Stump <mrs@wrs.com>
Sun, 2 Nov 1997 04:43:34 +0000 (04:43 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 2 Nov 1997 04:43:34 +0000 (21:43 -0700)
        * 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

gcc/ChangeLog
gcc/except.c
gcc/final.c

index 566eeebc6fc1fbc3ec954531b67b3d05d1cbaf7f..365826b24ea23b3876c9d7b17864633742a6f0fe 100644 (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
index 2a2554bc15b56d00a12ba6d5a14f6dd9e0f75679..b506096f6588b2d42dde191a5f96441109d67d6c 100644 (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))
     {
index 624e2113f19e675e29cf26a24310159f4695c8a1..d9a410b2b090349fff7bc7b08bbf30df768c1ac8 100644 (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