]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Remove it, maybe it can be done in the AST instead.
authorDale Weiler <killfieldengine@gmail.com>
Sat, 28 Sep 2013 10:09:24 +0000 (06:09 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 28 Sep 2013 10:09:24 +0000 (06:09 -0400)
ir.c

diff --git a/ir.c b/ir.c
index a7dd5acbe2a9c1565fd228a0826ff97653a866da..55fffb34f1e4c624b93a211fdb3c59fad311cebd 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -3178,32 +3178,6 @@ static bool gen_blocks_recursive(code_t *code, ir_function *func, ir_block *bloc
         if (instr->_ops[2])
             stmt.o2.u1 = ir_value_code_addr(instr->_ops[2]);
 
-        if (stmt.opcode == INSTR_NOT_F) {
-            /*
-             * We can optimize for superfluous cases of not.
-             */
-            if (i + 4 <= vec_size(block->instr)) {
-                for (j = 0; j < 2; j++) {
-                    if (ir_value_code_addr(block->instr[i+j]->_ops[0]) != ir_value_code_addr(block->instr[i+j]->_ops[1]))
-                        break;
-                }
-                if (--j && block->instr[i+2]->_ops[0] && block->instr[i+2]->_ops[1]
-                        && block->instr[i+3]->_ops[0] && block->instr[i+2]->_ops[1]
-                        && ir_value_code_addr(block->instr[i+2]->_ops[1]) == ir_value_code_addr(block->instr[i+3]->_ops[0])
-                        && ir_value_code_addr(block->instr[i+2]->_ops[0]) == ir_value_code_addr(block->instr[i+3]->_ops[1]))
-                {
-                    code_push_statement(code, &stmt, instr->context);
-                    code_push_statement(code, &stmt, instr->context);
-                    for (j = 1; j < 4; j++)
-                        block->instr[i+j]->opcode = VINSTR_NOP;
-                    ++opts_optimizationcount[OPTIM_PEEPHOLE];
-                    continue;
-                }
-            }
-            code_push_statement(code, &stmt, instr->context);
-            continue;
-        }
-
         if (stmt.opcode == INSTR_RETURN || stmt.opcode == INSTR_DONE)
         {
             stmt.o1.u1 = stmt.o3.u1;
@@ -3228,7 +3202,6 @@ static bool gen_blocks_recursive(code_t *code, ir_function *func, ir_block *bloc
                 continue;
             }
         }
-
         code_push_statement(code, &stmt, instr->context);
     }
     return true;