Commit f19c9228 by Jakub Jelinek Committed by Jakub Jelinek

except.c (find_exception_handler_labels_1): New function.

	* except.c (find_exception_handler_labels_1): New function.
	(find_exception_handler_labels): Split into two functions, dive
	into CALL_PLACEHOLDERs when looking for exception handler labels.

From-SVN: r33849
parent 36348eab
2000-05-11 Jakub Jelinek <jakub@redhat.com>
* except.c (find_exception_handler_labels_1): New function.
(find_exception_handler_labels): Split into two functions, dive
into CALL_PLACEHOLDERs when looking for exception handler labels.
2000-05-11 Stan Cox <scox@cygnus.com> 2000-05-11 Stan Cox <scox@cygnus.com>
* regrename.c (replace_reg_in_block): Improve REG_DEAD handling. * regrename.c (replace_reg_in_block): Improve REG_DEAD handling.
......
...@@ -2388,27 +2388,18 @@ emit_eh_context () ...@@ -2388,27 +2388,18 @@ emit_eh_context ()
} }
} }
/* Scan the current insns and build a list of handler labels. The /* Scan the insn chain F and build a list of handler labels. The
resulting list is placed in the global variable exception_handler_labels. resulting list is placed in the global variable exception_handler_labels. */
It is called after the last exception handling region is added to static void
the current function (when the rtl is almost all built for the find_exception_handler_labels_1 (f)
current function) and before the jump optimization pass. */ rtx f;
void
find_exception_handler_labels ()
{ {
rtx insn; rtx insn;
exception_handler_labels = NULL_RTX;
/* If we aren't doing exception handling, there isn't much to check. */
if (! doing_eh (0))
return;
/* For each start of a region, add its label to the list. */ /* For each start of a region, add its label to the list. */
for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) for (insn = f; insn; insn = NEXT_INSN (insn))
{ {
struct handler_info* ptr; struct handler_info* ptr;
if (GET_CODE (insn) == NOTE if (GET_CODE (insn) == NOTE
...@@ -2427,9 +2418,34 @@ find_exception_handler_labels () ...@@ -2427,9 +2418,34 @@ find_exception_handler_labels ()
ptr->handler_label, exception_handler_labels); ptr->handler_label, exception_handler_labels);
} }
} }
else if (GET_CODE (insn) == CALL_INSN
&& GET_CODE (PATTERN (insn)) == CALL_PLACEHOLDER)
{
find_exception_handler_labels_1 (XEXP (PATTERN (insn), 0));
find_exception_handler_labels_1 (XEXP (PATTERN (insn), 1));
find_exception_handler_labels_1 (XEXP (PATTERN (insn), 2));
}
} }
} }
/* Scan the current insns and build a list of handler labels. The
resulting list is placed in the global variable exception_handler_labels.
It is called after the last exception handling region is added to
the current function (when the rtl is almost all built for the
current function) and before the jump optimization pass. */
void
find_exception_handler_labels ()
{
exception_handler_labels = NULL_RTX;
/* If we aren't doing exception handling, there isn't much to check. */
if (! doing_eh (0))
return;
find_exception_handler_labels_1 (get_insns ());
}
/* Return a value of 1 if the parameter label number is an exception handler /* Return a value of 1 if the parameter label number is an exception handler
label. Return 0 otherwise. */ label. Return 0 otherwise. */
......
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