summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-23 09:38:46 -0700
committerBrian <[email protected]>2007-02-23 09:38:46 -0700
commitc18c75b0b78a7a4391d94864fdd3466a0095342f (patch)
tree3ca2cc2261454c100e37a81d949a2203e24cf257
parentafbf7c7e6b7613d8d219807adaf7d17971ac2e6d (diff)
remove old _slang_gen_if()
-rw-r--r--src/mesa/shader/slang/slang_codegen.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 3d9b23693ac..fb3bab4f3f9 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1439,58 +1439,6 @@ _slang_gen_for(slang_assemble_ctx * A, const slang_operation *oper)
}
-#if 0
-/**
- * Generate IR tree for an if/then/else conditional using BRAnch instructions.
- */
-static slang_ir_node *
-_slang_gen_if(slang_assemble_ctx * A, const slang_operation *oper)
-{
- /*
- * eval expr (child[0]), updating condcodes
- * branch if false to _else or _endif
- * "true" code block
- * if haveElseClause clause:
- * jump "__endif"
- * label "__else"
- * "false" code block
- * label "__endif"
- */
- const GLboolean haveElseClause = !_slang_is_noop(&oper->children[2]);
- slang_ir_node *cond, *bra, *trueBody, *endifLab, *tree;
- slang_atom elseAtom = slang_atom_pool_gen(A->atoms, "__else");
- slang_atom endifAtom = slang_atom_pool_gen(A->atoms, "__endif");
-
- cond = _slang_gen_operation(A, &oper->children[0]);
- cond = new_cond(cond);
- /*assert(cond->Store);*/
- bra = new_cjump(haveElseClause ? elseAtom : endifAtom, 0);
- tree = new_seq(cond, bra);
-
- trueBody = _slang_gen_operation(A, &oper->children[1]);
- tree = new_seq(tree, trueBody);
-
- if (haveElseClause) {
- /* else clause */
- slang_ir_node *jump, *elseLab, *falseBody;
- jump = new_jump(endifAtom);
- tree = new_seq(tree, jump);
-
- elseLab = new_label(elseAtom);
- tree = new_seq(tree, elseLab);
-
- falseBody = _slang_gen_operation(A, &oper->children[2]);
- tree = new_seq(tree, falseBody);
- }
-
- endifLab = new_label(endifAtom);
- tree = new_seq(tree, endifLab);
-
- return tree;
-}
-#endif
-
-
/**
* Determine if the given operation is of a specific type.
*/