Commit f949afd0 authored by Michael Beck's avatar Michael Beck
Browse files

Small optimization. Note that the else case crashes libFirm and must be fixed,...

Small optimization. Note that the else case crashes libFirm and must be fixed, or disable inlining with exceptions yet.

[r26943]
parent 01c9ef11
......@@ -1205,9 +1205,14 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
}
}
if (n_exc > 0) {
ir_node *block = new_Block(n_exc, cf_pred);
set_cur_block(block);
set_Tuple_pred(call, pn_Call_X_except, new_Jmp());
if (n_exc == 1) {
/* simple fix */
set_Tuple_pred(call, pn_Call_X_except, cf_pred[0]);
} else {
ir_node *block = new_Block(n_exc, cf_pred);
set_cur_block(block);
set_Tuple_pred(call, pn_Call_X_except, new_Jmp());
}
} else {
set_Tuple_pred(call, pn_Call_X_except, new_Bad());
}
......
Supports Markdown
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