X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fopt%2Fopt_osr.c;h=94e15704e4d37646f2adf64b062955dd75122973;hb=629ae37a01e0b2a044025152cde4a7668ad25f6c;hp=ad312eb67afc69531553718b8a1c2a6e4066012c;hpb=aaa7dd80d3b440af5f7a05d6b81b3b494a8367e6;p=libfirm diff --git a/ir/opt/opt_osr.c b/ir/opt/opt_osr.c index ad312eb67..94e15704e 100644 --- a/ir/opt/opt_osr.c +++ b/ir/opt/opt_osr.c @@ -38,6 +38,7 @@ #include "hashptr.h" #include "irtools.h" #include "array.h" +#include "firmstat.h" /** The debug handle. */ DEBUG_ONLY(static firm_dbg_module_t *dbg;) @@ -362,11 +363,8 @@ static ir_node *reduce(ir_node *orig, ir_node *iv, ir_node *rc, iv_env *env) { else if (is_Phi(result)) o = apply(orig, o, rc, env); else { - switch (code) { - case iro_Mul: + if (code == iro_Mul) o = apply(orig, o, rc, env); - break; - } } set_irn_n(result, i, o); } @@ -395,6 +393,7 @@ static void replace(ir_node *irn, ir_node *iv, ir_node *rc, iv_env *env) { if (result != irn) { node_entry *e, *iv_e; + hook_strength_red(current_ir_graph, irn); exchange(irn, result); e = get_irn_ne(result, env); iv_e = get_irn_ne(iv, env); @@ -441,6 +440,8 @@ static int check_replace(ir_node *irn, iv_env *env) { return 1; } break; + default: + break; } return 0; }