Commit 755a0b99 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix new_Block users

[r24615]
parent 2b0a9342
......@@ -203,6 +203,7 @@ static ir_node * create_Block(int n, ir_node ** in) {
ir_node * block;
set_optimize(0);
block = new_Block(n, in);
set_cur_block(block);
set_optimize(rem_opt);
return block;
}
......
......@@ -135,6 +135,7 @@ static void create_if_cascade(ifcas_env_t *env, ir_node *curblock,
set_Block_cfgpred(curcases[0].target, 0, new_Proj(cond, mode_X, pn_Cond_true));
in[0] = new_Proj(cond, mode_X, pn_Cond_false);
neblock = new_Block(1, in);
set_cur_block(neblock);
/* second part: "else if(sel == val[1]) goto target[1] else goto default;" */
val = new_Const_long(get_irn_mode(env->sel), curcases[1].value);
......@@ -160,6 +161,7 @@ static void create_if_cascade(ifcas_env_t *env, ir_node *curblock,
set_cur_block(curblock);
in[0] = new_Proj(cond, mode_X, pn_Cond_false);
geblock = new_Block(1, in);
set_cur_block(geblock);
create_if_cascade(env, ltblock, curcases, midcase);
create_if_cascade(env, geblock, curcases + midcase, numcases - midcase);
......
......@@ -1167,7 +1167,9 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
}
}
if (n_exc > 0) {
new_Block(n_exc, cf_pred); /* watch it: current_block is changed! */
ir_node *block = new_Block(n_exc, cf_pred);
set_cur_block(block);
set_Tuple_pred(call, pn_Call_X_except, new_Jmp());
/* The Phi for the memories with the exception objects */
n_exc = 0;
......
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