X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fboolopt.c;h=a39b3fb7fe333e5de4c7c47ac08e631abbe92df7;hb=b4a3d8471ab4a2ad12041f4ef1cb2473d9b5fe4c;hp=ca97dc47bfeaa7d58d791da72fcfc5fadfdbd7f5;hpb=d5ad877ada2809b07ddb33f4d27d97ddb893d352;p=libfirm diff --git a/ir/opt/boolopt.c b/ir/opt/boolopt.c index ca97dc47b..a39b3fb7f 100644 --- a/ir/opt/boolopt.c +++ b/ir/opt/boolopt.c @@ -100,7 +100,7 @@ static ir_node *bool_and(cond_pair* const cpair) (pnc_hi == pn_Cmp_Eq || pnc_hi == pn_Cmp_Ge || pnc_hi == pn_Cmp_Gt)) { /* x >=|>|!= lo || x ==|>=|> hi -> x ==|>=|> hi */ return proj_hi; - } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo))) { /* lo + 1 == hi */ + } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo, NULL))) { /* lo + 1 == hi */ if (pnc_lo == pn_Cmp_Ge && pnc_hi == pn_Cmp_Lt) { /* x >= c || x < c + 1 -> x == c */ ir_graph *const irg = current_ir_graph; @@ -161,7 +161,7 @@ static ir_node *bool_or(cond_pair *const cpair) (pnc_hi == pn_Cmp_Eq || pnc_hi == pn_Cmp_Ge || pnc_hi == pn_Cmp_Gt)) { /* x >=|>|!= lo || x ==|>=|> hi -> x >=|>|!= lo */ return proj_lo; - } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo))) { /* lo + 1 == hi */ + } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo, NULL))) { /* lo + 1 == hi */ if (pnc_lo == pn_Cmp_Lt && pnc_hi == pn_Cmp_Ge) { /* x < c || x >= c + 1 -> x != c */ ir_graph *const irg = current_ir_graph; @@ -187,7 +187,7 @@ static ir_node *bool_or(cond_pair *const cpair) return p; } } else if (pnc_lo == pn_Cmp_Eq && pnc_hi == pn_Cmp_Ge) { - /* x == c || c >= c + 1 -> x >= c */ + /* x == c || x >= c + 1 -> x >= c */ ir_graph *const irg = current_ir_graph; ir_node *const block = get_nodes_block(cmp_lo); ir_node *const p = new_r_Proj(irg, block, cmp_lo, mode_b, pn_Cmp_Ge); @@ -426,7 +426,7 @@ void opt_bool(ir_graph *const irg) { irg_walk_graph(irg, NULL, bool_walk, NULL); - set_using_block_mark(irg); + ir_reserve_resources(irg, IR_RESOURCE_BLOCK_MARK); irg_walk_graph(irg, clear_block_infos, collect_phis, NULL); @@ -437,5 +437,5 @@ void opt_bool(ir_graph *const irg) set_irg_extblk_inconsistent(irg); set_irg_loopinfo_inconsistent(irg); - clear_using_block_mark(irg); + ir_free_resources(irg, IR_RESOURCE_BLOCK_MARK); }