minor clean-ups

This commit is contained in:
Brian
2007-01-28 12:13:27 -07:00
parent bbec2fdb3a
commit 602dc1a638
+1 -8
View File
@@ -353,7 +353,6 @@ free_temp_storage(slang_var_table *vt, slang_ir_node *n)
if (n->Store->File == PROGRAM_TEMPORARY && n->Store->Index >= 0) {
if (_slang_is_temp(vt, n->Store)) {
_slang_free_temp(vt, n->Store);
/* XXX free(store)? */
n->Store->Index = -1;
n->Store->Size = -1;
}
@@ -410,8 +409,6 @@ storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st)
assert(st->File != PROGRAM_UNDEFINED);
assert(st->Size >= 1);
assert(st->Size <= 4);
/* XXX swizzling logic here may need some work */
/*src->Swizzle = swizzle_swizzlee(swizzle, defaultSwizzle[st->Size - 1]);*/
if (st->Swizzle != SWIZZLE_NOOP)
src->Swizzle = st->Swizzle;
else
@@ -579,14 +576,10 @@ emit_binop(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog)
struct prog_instruction *inst;
const slang_ir_info *info = slang_find_ir_info(n->Opcode);
char *srcAnnot0 = NULL, *srcAnnot1 = NULL, *dstAnnot = NULL;
assert(info);
assert(info->InstOpcode != OPCODE_NOP);
/* XXX check if Opcode == OPCODE_ADD, then check if either child is a MUL,
* replace with MAD instruction.
*/
#if PEEPHOLE_OPTIMIZATIONS
/* Look for MAD opportunity */
if (n->Opcode == IR_ADD && n->Children[0]->Opcode == IR_MUL) {