Commit 8f36a29b authored by Matthias Braun's avatar Matthias Braun
Browse files

implement NoMem,Sel for duplicate_subgraph

parent 20f95aba
......@@ -307,6 +307,19 @@ ir_node *duplicate_subgraph(dbg_info *dbg, ir_node *n, ir_node *block)
case iro_Not:
return new_rd_Not(dbg, block,
duplicate_subgraph(dbg, get_Not_op(n), block), mode);
case iro_NoMem:
return get_irg_no_mem(irg);
case iro_Sel: {
ir_node *mem = duplicate_subgraph(dbg, get_Sel_mem(n), block);
ir_node *ptr = duplicate_subgraph(dbg, get_Sel_ptr(n), block);
int n_indexs = get_Sel_n_indexs(n);
ir_node **in = ALLOCAN(ir_node*, n_indexs);
for (int i = 0; i < n_indexs; ++i) {
in[i] = duplicate_subgraph(dbg, get_Sel_index(n, i), block);
}
ir_entity *entity = get_Sel_entity(n);
return new_rd_Sel(dbg, block, mem, ptr, n_indexs, in, entity);
}
case iro_Unknown:
return new_r_Unknown(irg, mode);
default:
......
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