This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
eh summary patch
- To: egcs at cygnus dot com
- Subject: eh summary patch
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 15 Oct 1997 02:37:39 -0700
- Reply-To: Richard Henderson <rth at cygnus dot com>
I'd put together this change in support of the previous patch
before I realized that it wasn't needed there. But it can still
be useful, e.g. in the Alpha machine dependent reorg pass.
r~
Wed Oct 15 02:05:49 1997 Richard Henderson <rth@cygnus.com>
* function.c (current_function_contains_eh_regions): New variable.
(push_function_context_to): Save it.
(pop_function_context_from): Restore it.
(init_function_start): Clear it.
* except.c (expand_eh_region_start_for_decl): Set it.
* function.h: Declare it.
(struct function): Make room to save it.
Index: except.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/except.c,v
retrieving revision 1.8
diff -u -p -d -r1.8 except.c
--- except.c 1997/09/30 23:15:58 1.8
+++ except.c 1997/10/15 09:00:27
@@ -1037,7 +1037,10 @@ expand_eh_region_start_for_decl (decl)
}
if (exceptions_via_longjmp == 0)
- note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
+ {
+ note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
+ current_function_contains_eh_regions = 1;
+ }
push_eh_entry (&ehstack);
if (exceptions_via_longjmp == 0)
NOTE_BLOCK_NUMBER (note)
Index: function.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/function.c,v
retrieving revision 1.2
diff -u -p -d -r1.2 function.c
--- function.c 1997/08/27 19:59:51 1.2
+++ function.c 1997/10/15 09:00:29
@@ -132,6 +132,10 @@ int current_function_has_nonlocal_goto;
int current_function_contains_functions;
+/* Nonzero if function being compiled contains exception handling regions. */
+
+int current_function_contains_eh_regions;
+
/* Nonzero if the current function is a thunk (a lightweight function that
just adjusts one of its arguments and forwards to another function), so
we should try to cut corners where we can. */
@@ -494,6 +498,7 @@ push_function_context_to (context)
p->has_nonlocal_label = current_function_has_nonlocal_label;
p->has_nonlocal_goto = current_function_has_nonlocal_goto;
p->contains_functions = current_function_contains_functions;
+ p->contains_eh_regions = current_function_contains_eh_regions;
p->is_thunk = current_function_is_thunk;
p->args_size = current_function_args_size;
p->pretend_args_size = current_function_pretend_args_size;
@@ -574,6 +579,7 @@ pop_function_context_from (context)
current_function_calls_alloca = p->calls_alloca;
current_function_has_nonlocal_label = p->has_nonlocal_label;
current_function_has_nonlocal_goto = p->has_nonlocal_goto;
+ current_function_contains_eh_regions = p->contains_eh_regions;
current_function_is_thunk = p->is_thunk;
current_function_args_size = p->args_size;
current_function_pretend_args_size = p->pretend_args_size;
@@ -5018,6 +5024,7 @@ init_function_start (subr, filename, lin
current_function_has_nonlocal_label = 0;
current_function_has_nonlocal_goto = 0;
current_function_contains_functions = 0;
+ current_function_contains_eh_regions = 0;
current_function_is_thunk = 0;
current_function_returns_pcc_struct = 0;
Index: function.h
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/function.h,v
retrieving revision 1.1.1.1
diff -u -p -d -r1.1.1.1 function.h
--- function.h 1997/08/11 15:57:07 1.1.1.1
+++ function.h 1997/10/15 09:00:29
@@ -78,6 +78,7 @@ struct function
int has_nonlocal_label;
int has_nonlocal_goto;
int contains_functions;
+ int contains_eh_regions;
int is_thunk;
rtx nonlocal_goto_handler_slot;
rtx nonlocal_goto_stack_level;
Index: output.h
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/output.h,v
retrieving revision 1.1.1.1
diff -u -p -d -r1.1.1.1 output.h
--- output.h 1997/08/11 15:57:12 1.1.1.1
+++ output.h 1997/10/15 09:00:29
@@ -361,6 +361,10 @@ extern int current_function_has_nonlocal
extern int current_function_contains_functions;
+/* Nonzero if function being compiled contains exception handling regions. */
+
+extern int current_function_contains_eh_regions;
+
/* Nonzero if the current function returns a pointer type */
extern int current_function_returns_pointer;