Commit fac62ecf by Jason Merrill Committed by Jason Merrill

except.c (nothrow_function_p): If -fno-exceptions, just return.

        * except.c (nothrow_function_p): If -fno-exceptions, just return.
        (init_eh_nesting_info): Likewise.

From-SVN: r32454
parent 12a22e76
2000-03-09 Jason Merrill <jason@casey.cygnus.com> 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
* except.c (nothrow_function_p): If -fno-exceptions, just return.
(init_eh_nesting_info): Likewise.
* tree.h (struct tree_common): Rename raises_flag to nothrow_flag. * tree.h (struct tree_common): Rename raises_flag to nothrow_flag.
(TREE_NOTHROW): Rename from TREE_RAISES. (TREE_NOTHROW): Rename from TREE_RAISES.
* toplev.c (rest_of_compilation): Set it. * toplev.c (rest_of_compilation): Set it.
......
...@@ -2651,6 +2651,9 @@ nothrow_function_p () ...@@ -2651,6 +2651,9 @@ nothrow_function_p ()
{ {
rtx insn; rtx insn;
if (! flag_exceptions)
return 1;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (can_throw (insn)) if (can_throw (insn))
return 0; return 0;
...@@ -3185,6 +3188,7 @@ in_same_eh_region (insn1, insn2) ...@@ -3185,6 +3188,7 @@ in_same_eh_region (insn1, insn2)
yet. At some point in the future we can trim out handlers which we 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, know cannot be called. (ie, if a block has an INT type handler,
control will never be passed to an outer INT type handler). */ control will never be passed to an outer INT type handler). */
static void static void
process_nestinfo (block, info, nested_eh_region) process_nestinfo (block, info, nested_eh_region)
int block; int block;
...@@ -3263,6 +3267,7 @@ process_nestinfo (block, info, nested_eh_region) ...@@ -3263,6 +3267,7 @@ process_nestinfo (block, info, nested_eh_region)
/* This function will allocate and initialize an eh_nesting_info structure. /* This function will allocate and initialize an eh_nesting_info structure.
It returns a pointer to the completed data structure. If there are It returns a pointer to the completed data structure. If there are
no exception regions, a NULL value is returned. */ no exception regions, a NULL value is returned. */
eh_nesting_info * eh_nesting_info *
init_eh_nesting_info () init_eh_nesting_info ()
{ {
...@@ -3273,6 +3278,9 @@ init_eh_nesting_info () ...@@ -3273,6 +3278,9 @@ init_eh_nesting_info ()
rtx insn; rtx insn;
int x; int x;
if (! flag_exceptions)
return 0;
info = (eh_nesting_info *) xmalloc (sizeof (eh_nesting_info)); info = (eh_nesting_info *) xmalloc (sizeof (eh_nesting_info));
info->region_index = (int *) xcalloc ((max_label_num () + 1), sizeof (int)); info->region_index = (int *) xcalloc ((max_label_num () + 1), sizeof (int));
nested_eh_region = (int *) xcalloc (max_label_num () + 1, sizeof (int)); nested_eh_region = (int *) xcalloc (max_label_num () + 1, sizeof (int));
...@@ -3343,6 +3351,7 @@ init_eh_nesting_info () ...@@ -3343,6 +3351,7 @@ init_eh_nesting_info ()
HANDLERS is the address of a pointer to a vector of handler_info pointers. 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. Upon return, this will have the handlers which can be reached by block.
This function returns the number of elements in the handlers vector. */ This function returns the number of elements in the handlers vector. */
int int
reachable_handlers (block, info, insn, handlers) reachable_handlers (block, info, insn, handlers)
int block; int block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment