X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbessadestr.c;h=db7ddc7473a7a8488674c7e8368997545e485235;hb=01940748e783a49ba0f2a5edccd33346499401b3;hp=041c9d7801a2482f52b694edb1a9f8f827300181;hpb=89643a6a3a23014db20f0203257ba6a58a0c431d;p=libfirm diff --git a/ir/be/bessadestr.c b/ir/be/bessadestr.c index 041c9d780..db7ddc747 100644 --- a/ir/be/bessadestr.c +++ b/ir/be/bessadestr.c @@ -131,13 +131,15 @@ static void insert_all_perms_walker(ir_node *bl, void *data) { * register class by construction. */ for(phi = get_irn_link(bl); phi; phi = get_irn_link(phi)) { - ir_node *arg = get_irn_n(phi, i); - unsigned hash = hash_irn(arg); - perm_proj_t templ; + ir_node *arg = get_irn_n(phi, i); + const arch_register_req_t *req = arch_get_register_req_out(arg); + unsigned hash; + perm_proj_t templ; - if (arch_irn_is(arg, ignore)) + if (req->type & arch_register_req_type_ignore) continue; + hash = hash_irn(arg); templ.arg = arg; pp = set_find(arg_set, &templ, sizeof(templ), hash); @@ -232,26 +234,27 @@ static void set_regs_or_place_dupls_walker(ir_node *bl, void *data) { /* Consider all phis of this block */ for (phi = get_irn_link(bl); phi; phi = get_irn_link(phi)) { - int i, max; - ir_node *arg, *phi_block, *arg_block; - const arch_register_t *phi_reg, *arg_reg; - const arch_register_class_t *cls; + ir_node *phi_block = get_nodes_block(phi); + const arch_register_t *phi_reg = get_reg(phi); + const arch_register_class_t *cls = phi_reg->reg_class; + int max; + int i; assert(is_Phi(phi) && "Can only handle phi-destruction :)"); - phi_block = get_nodes_block(phi); - phi_reg = get_reg(phi); - cls = arch_get_irn_reg_class(phi, -1); - /* process all arguments of the phi */ for (i = 0, max = get_irn_arity(phi); i < max; ++i) { - arg = get_irn_n(phi, i); - arg_block = get_Block_cfgpred_block(phi_block, i); - arg_reg = get_reg(arg); + ir_node *arg = get_irn_n(phi, i); + const arch_register_req_t *req = arch_get_register_req_out(arg); + const arch_register_t *arg_reg; + ir_node *arg_block; - if (arch_irn_is(arg, ignore)) + if (req->type & arch_register_req_type_ignore) continue; + arg_block = get_Block_cfgpred_block(phi_block, i); + arg_reg = get_reg(arg); + assert(arg_reg && "Register must be set while placing perms"); DBG((dbg, LEVEL_1, " for %+F(%s) -- %+F(%s)\n", phi, phi_reg->name, arg, arg_reg->name)); @@ -423,9 +426,10 @@ static void ssa_destruction_check_walker(ir_node *bl, void *data) { phi_reg = get_reg(phi); /* iterate over all args of phi */ for (i = 0, max = get_irn_arity(phi); i < max; ++i) { - ir_node *arg = get_irn_n(phi, i); + ir_node *arg = get_irn_n(phi, i); + const arch_register_req_t *req = arch_get_register_req_out(arg); - if (arch_irn_is(arg, ignore)) + if (req->type & arch_register_req_type_ignore) continue; arg_reg = get_reg(arg);