Skip to content

Commit

Permalink
[imcc] fixup ins print
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Feb 27, 2014
1 parent 980ad41 commit 93fbe9c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions compilers/imcc/optimizer.c
Expand Up @@ -496,7 +496,7 @@ strength_reduce(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
ins->symregs[0] == ins->symregs[2]))) {
IMCC_debug(imcc, DEBUG_OPT1, "opt1 ");
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
IMCC_debug(imcc, DEBUG_OPT1, " => ");
IMCC_debug(imcc, DEBUG_OPT1, " => ");
if (ins->symregs[0] == ins->symregs[1]) {
ins->symregs[1] = ins->symregs[2];
}
Expand Down Expand Up @@ -535,7 +535,7 @@ strength_reduce(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
atof(ins->symregs[1]->name) == 1.0)) {
IMCC_debug(imcc, DEBUG_OPT1, "opt1 ");
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
IMCC_debug(imcc, DEBUG_OPT1, " => ");
IMCC_debug(imcc, DEBUG_OPT1, " => ");
ins = delete_ins(unit, ins);
if (ins)
ins = ins->prev ? ins->prev : unit->instructions;
Expand All @@ -559,7 +559,7 @@ strength_reduce(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
atof(ins->symregs[1]->name) == 1.0)) {
IMCC_debug(imcc, DEBUG_OPT1, "opt1 ", ins);
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
IMCC_debug(imcc, DEBUG_OPT1, " => ");
IMCC_debug(imcc, DEBUG_OPT1, " => ");
--ins->symregs[1]->use_count;
if (ins->op == &core_ops->op_info_table[PARROT_OP_add_i_ic] ||
ins->op == &core_ops->op_info_table[PARROT_OP_add_n_nc])
Expand Down Expand Up @@ -613,7 +613,7 @@ strength_reduce(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
atof(ins->symregs[1]->name) == 1.0)) {
IMCC_debug(imcc, DEBUG_OPT1, "opt1 ");
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
IMCC_debug(imcc, DEBUG_OPT1, " => ");
IMCC_debug(imcc, DEBUG_OPT1, " => ");
if (ins->symregs[1]->type == VTCONST) {
--ins->symregs[1]->use_count;
ins->symregs[1] = ins->symregs[2];
Expand Down Expand Up @@ -645,7 +645,7 @@ strength_reduce(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
(f = atof(ins->symregs[1]->name), FLOAT_IS_ZERO(f)))) {
IMCC_debug(imcc, DEBUG_OPT1, "opt1 ");
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
IMCC_debug(imcc, DEBUG_OPT1, " => ");
IMCC_debug(imcc, DEBUG_OPT1, " => ");
r = mk_const(imcc, "0", ins->symregs[0]->set);
--ins->symregs[1]->use_count;
if (ins->opsize == 4)
Expand All @@ -668,7 +668,7 @@ strength_reduce(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
ins->symregs[1]->name[0] != '-')) {
IMCC_debug(imcc, DEBUG_OPT1, "opt1 ");
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
IMCC_debug(imcc, DEBUG_OPT1, " => ");
IMCC_debug(imcc, DEBUG_OPT1, " => ");
--ins->symregs[1]->use_count;
tmp = INS(imcc, unit, "null", "", ins->symregs, 1, 0, 0);
tmp->type = ITPUREFUNC;
Expand Down Expand Up @@ -1565,7 +1565,7 @@ dead_code_remove(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit))
STREQ(last->opname, "branch")) {
IMCC_debug(imcc, DEBUG_OPT1,
"unreachable ins deleted (after branch) ");
IMCC_debug(imcc, DEBUG_OPT1, ins);
IMCC_debug_ins(imcc, DEBUG_OPT1, ins);
ins = delete_ins(unit, ins);
unit->ostat.deleted_ins++;
changed++;
Expand Down

0 comments on commit 93fbe9c

Please sign in to comment.