diff options
author | Brian <[email protected]> | 2007-03-26 17:16:26 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-26 17:16:26 -0600 |
commit | 6583429f89df1b6838c5405bd32e5ef30bdf163f (patch) | |
tree | 757e14e1844f995e1a59c2eed479806694db2521 /src/mesa | |
parent | 037c06846041877fb03890864520daa33b5fa4a9 (diff) |
Get rid of IR_JUMP and related code.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 21 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_ir.c | 4 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_ir.h | 2 |
3 files changed, 2 insertions, 25 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 92bfb54d80c..e747a6ef327 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -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); diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 14a7b694bd0..95b154db687 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -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"); diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 2e90409cafd..a617a7e1737 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -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 */ |