Commit a8b3ba8b by Jan Hubicka Committed by Jan Hubicka

Patch by Richard Henderson:

	* tree-eh.c (tree_can_throw_internal, tree_can_throw_external):
	Handle RESX expressions properly.

From-SVN: r99698
parent a78b491f
2005-05-14 Jan Hubicka <jh@suse.cz> 2005-05-14 Jan Hubicka <jh@suse.cz>
Patch by Richard Henderson:
* tree-eh.c (tree_can_throw_internal, tree_can_throw_external):
Handle RESX expressions properly.
* tree-eh.c (record_stmt_eh_region): Use add_stmt_to_eh_region. * tree-eh.c (record_stmt_eh_region): Use add_stmt_to_eh_region.
(add_stmt_to_eh_region_fn): Nest into CALL_EXPR. (add_stmt_to_eh_region_fn): Nest into CALL_EXPR.
(remove_stmt_from_eh_region_fn): Likewise. (remove_stmt_from_eh_region_fn): Likewise.
......
...@@ -2008,7 +2008,12 @@ tree_could_throw_p (tree t) ...@@ -2008,7 +2008,12 @@ tree_could_throw_p (tree t)
bool bool
tree_can_throw_internal (tree stmt) tree_can_throw_internal (tree stmt)
{ {
int region_nr = lookup_stmt_eh_region (stmt); int region_nr;
if (TREE_CODE (stmt) == RESX_EXPR)
region_nr = TREE_INT_CST_LOW (TREE_OPERAND (stmt, 0));
else
region_nr = lookup_stmt_eh_region (stmt);
if (region_nr < 0) if (region_nr < 0)
return false; return false;
return can_throw_internal_1 (region_nr); return can_throw_internal_1 (region_nr);
...@@ -2017,10 +2022,16 @@ tree_can_throw_internal (tree stmt) ...@@ -2017,10 +2022,16 @@ tree_can_throw_internal (tree stmt)
bool bool
tree_can_throw_external (tree stmt) tree_can_throw_external (tree stmt)
{ {
int region_nr = lookup_stmt_eh_region (stmt); int region_nr;
if (TREE_CODE (stmt) == RESX_EXPR)
region_nr = TREE_INT_CST_LOW (TREE_OPERAND (stmt, 0));
else
region_nr = lookup_stmt_eh_region (stmt);
if (region_nr < 0) if (region_nr < 0)
return false; return tree_could_throw_p (stmt);
return can_throw_external_1 (region_nr); else
return can_throw_external_1 (region_nr);
} }
bool bool
......
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