Patch to omit dwarf2 unwind info for leaves
Jason Merrill
jason@cygnus.com
Thu Mar 9 12:36:00 GMT 2000
And another tweak: If we're not doing EH, there's no reason to spend the
time walking the insns...
2000-03-09 Jason Merrill <jason@casey.cygnus.com>
* except.c (nothrow_function_p): If -fno-exceptions, just return.
(init_eh_nesting_info): Likewise.
Index: except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/except.c,v
retrieving revision 1.121
diff -c -p -r1.121 except.c
*** except.c 2000/03/09 19:01:46 1.121
--- except.c 2000/03/09 20:32:48
*************** nothrow_function_p ()
*** 2651,2656 ****
--- 2651,2659 ----
{
rtx insn;
+ if (! flag_exceptions)
+ return 1;
+
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (can_throw (insn))
return 0;
*************** in_same_eh_region (insn1, insn2)
*** 3185,3190 ****
--- 3188,3194 ----
yet. At some point in the future we can trim out handlers which we
know cannot be called. (ie, if a block has an INT type handler,
control will never be passed to an outer INT type handler). */
+
static void
process_nestinfo (block, info, nested_eh_region)
int block;
*************** process_nestinfo (block, info, nested_eh
*** 3263,3268 ****
--- 3267,3273 ----
/* This function will allocate and initialize an eh_nesting_info structure.
It returns a pointer to the completed data structure. If there are
no exception regions, a NULL value is returned. */
+
eh_nesting_info *
init_eh_nesting_info ()
{
*************** init_eh_nesting_info ()
*** 3273,3278 ****
--- 3278,3286 ----
rtx insn;
int x;
+ if (! flag_exceptions)
+ return 0;
+
info = (eh_nesting_info *) xmalloc (sizeof (eh_nesting_info));
info->region_index = (int *) xcalloc ((max_label_num () + 1), sizeof (int));
nested_eh_region = (int *) xcalloc (max_label_num () + 1, sizeof (int));
*************** init_eh_nesting_info ()
*** 3343,3348 ****
--- 3351,3357 ----
HANDLERS is the address of a pointer to a vector of handler_info pointers.
Upon return, this will have the handlers which can be reached by block.
This function returns the number of elements in the handlers vector. */
+
int
reachable_handlers (block, info, insn, handlers)
int block;
More information about the Gcc-patches
mailing list