Get rid of IR_JUMP and related code.
authorBrian <brian@yutani.localnet.net>
Mon, 26 Mar 2007 23:16:26 +0000 (17:16 -0600)
committerBrian <brian@yutani.localnet.net>
Mon, 26 Mar 2007 23:16:26 +0000 (17:16 -0600)
src/mesa/shader/slang/slang_emit.c
src/mesa/shader/slang/slang_ir.c
src/mesa/shader/slang/slang_ir.h

index 92bfb54..e747a6e 100644 (file)
@@ -711,22 +711,6 @@ emit_label(slang_emit_info *emitInfo, const slang_ir_node *n)
 
 
 static struct prog_instruction *
-emit_jump(slang_emit_info *emitInfo, slang_ir_node *n)
-{
-   struct prog_instruction *inst;
-   assert(n);
-   assert(n->Label);
-   inst = new_instruction(emitInfo, OPCODE_BRA);
-   inst->DstReg.CondMask = COND_TR;  /* always branch */
-   inst->BranchTarget = _slang_label_get_location(n->Label);
-   if (inst->BranchTarget < 0) {
-      _slang_label_add_reference(n->Label, emitInfo->prog->NumInstructions - 1);
-   }
-   return inst;
-}
-
-
-static struct prog_instruction *
 emit_return(slang_emit_info *emitInfo, slang_ir_node *n)
 {
    struct prog_instruction *inst;
@@ -1517,10 +1501,7 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
 
    case IR_LABEL:
       return emit_label(emitInfo, n);
-   case IR_JUMP:
-      assert(n);
-      assert(n->Label);
-      return emit_jump(emitInfo, n);
+
    case IR_KILL:
       return emit_kill(emitInfo);
 
index 14a7b69..95b154d 100644 (file)
@@ -74,7 +74,6 @@ static const slang_ir_info IrInfo[] = {
    { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 },
    { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 },
    { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 },
-   { IR_JUMP, "IR_JUMP", OPCODE_NOP, 0, 0 },
    { IR_IF, "IR_IF", OPCODE_NOP, 0, 0 },
    { IR_KILL, "IR_KILL", OPCODE_NOP, 0, 0 },
    { IR_COND, "IR_COND", OPCODE_NOP, 0, 0 },
@@ -281,9 +280,6 @@ _slang_print_ir_tree(const slang_ir_node *n, int indent)
       printf("COND\n");
       _slang_print_ir_tree(n->Children[0], indent + 3);
       break;
-   case IR_JUMP:
-      printf("JUMP %s\n", n->Label->Name);
-      break;
 
    case IR_IF:
       printf("IF \n");
index 2e90409..a617a7e 100644 (file)
@@ -49,7 +49,7 @@ typedef enum
    IR_SCOPE,   /* new variable scope (one child) */
 
    IR_LABEL,   /* target of a jump or cjump */
-   IR_JUMP,    /* unconditional jump */
+
    IR_COND,    /* conditional expression/predicate */
 
    IR_IF,      /* high-level IF/then/else */