X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firssacons.c;h=9dd9e942c9ccf2b1794cb926e4e77d64446a5959;hb=b4647d67ab7885d5da32c2a30242fbc4ed93d81b;hp=4607870b40b26ed3d5737cd9b95bea4e6dc8fad9;hpb=32ea6ea0320f551448bb66e534e3351977464d42;p=libfirm diff --git a/ir/ir/irssacons.c b/ir/ir/irssacons.c index 4607870b4..9dd9e942c 100644 --- a/ir/ir/irssacons.c +++ b/ir/ir/irssacons.c @@ -31,66 +31,21 @@ #include "irgwalk.h" /** - * Post-walker: prepare the graph nodes for new SSA construction cycle by allocation - * new arrays. + * Post-walker: prepare the graph nodes for new SSA construction cycle by + * allocation new arrays. */ static void prepare_nodes(ir_node *irn, void *env) { (void)env; - switch (get_irn_opcode(irn)) { - case iro_Block: + if (is_Block(irn)) { + unsigned n_loc = current_ir_graph->n_loc; + struct obstack *obst = current_ir_graph->obst; /* reset mature flag */ irn->attr.block.is_matured = 0; - irn->attr.block.graph_arr = NEW_ARR_D(ir_node *, current_ir_graph->obst, - current_ir_graph->n_loc); - memset(irn->attr.block.graph_arr, 0, sizeof(ir_node *) * current_ir_graph->n_loc); + irn->attr.block.graph_arr = NEW_ARR_D(ir_node *, obst, n_loc); + memset(irn->attr.block.graph_arr, 0, sizeof(ir_node*) * n_loc); irn->attr.block.phis = NULL; - break; - /* note that the frag array must be cleared first, else firm_alloc_frag_arr() - will not allocate new memory. */ - case iro_Quot: - irn->attr.except.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Quot, &irn->attr.except.frag_arr); - break; - case iro_DivMod: - irn->attr.except.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_DivMod, &irn->attr.except.frag_arr); - break; - case iro_Div: - irn->attr.except.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Div, &irn->attr.except.frag_arr); - break; - case iro_Mod: - irn->attr.except.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Mod, &irn->attr.except.frag_arr); - break; - case iro_Call: - irn->attr.call.exc.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Call, &irn->attr.call.exc.frag_arr); - break; - case iro_Load: - irn->attr.load.exc.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Load, &irn->attr.load.exc.frag_arr); - break; - case iro_Store: - irn->attr.store.exc.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Store, &irn->attr.store.exc.frag_arr); - break; - case iro_Alloc: - irn->attr.alloc.exc.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Alloc, &irn->attr.alloc.exc.frag_arr); - break; - case iro_CopyB: - irn->attr.copyb.exc.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_CopyB, &irn->attr.copyb.exc.frag_arr); - break; - case iro_Raise: - irn->attr.bound.exc.frag_arr = NULL; - firm_alloc_frag_arr(irn, op_Bound, &irn->attr.bound.exc.frag_arr); - break; - default: - ; } }