try to simplify variable initializers
authorBrian <brian@yutani.localnet.net>
Fri, 2 Feb 2007 18:32:59 +0000 (11:32 -0700)
committerBrian <brian@yutani.localnet.net>
Fri, 2 Feb 2007 18:32:59 +0000 (11:32 -0700)
src/mesa/shader/slang/slang_codegen.c

index ee1d6cbabc0445b570df201ed9643d2dcc48ddaa..8631c9a21e0e2de3a54d09122960e6cfd8ab1370 100644 (file)
@@ -1891,9 +1891,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
          RETURN_ERROR2("Undefined variable:", varName, 0);
       }
       /* XXX make copy of this initializer? */
-
-      /* XXX try to simplify initializer here */foo
-
+      _slang_simplify(v->initializer, &A->space, A->atoms); 
       rhs = _slang_gen_operation(A, v->initializer);
       assert(rhs);
       init = new_node(IR_MOVE, var, rhs);