Commit 3126de0e authored by yb9976's avatar yb9976
Browse files

Use ir_throws_exception() instead of searching an exception Proj.

parent 77528c1c
......@@ -344,18 +344,6 @@ static bool inline_method(ir_node *const call, ir_graph *called_graph)
clear_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_ENTITY_USAGE);
edges_deactivate(irg);
/* Decide how to handle exception control flow: Is there a handler
for the Call node, or do we branch directly to End on an exception? */
bool has_exception = false;
for (ir_node *proj = (ir_node*)get_irn_link(call); proj != NULL;
proj = (ir_node*)get_irn_link(proj)) {
unsigned proj_nr = get_Proj_num(proj);
if (proj_nr == pn_Call_X_except) {
has_exception = true;
break;
}
}
/* entity link is used to link entities on old stack frame to the
* new stack frame */
irp_reserve_resources(irp, IRP_RESOURCE_ENTITY_LINK);
......@@ -567,7 +555,7 @@ static bool inline_method(ir_node *const call, ir_graph *called_graph)
branches to the End node.
*/
ir_node *call_x_exc;
if (has_exception) {
if (ir_throws_exception(call)) {
int n_exc = 0;
for (int i = 0; i < arity; i++) {
ir_node *ret = get_Block_cfgpred(end_bl, i);
......
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