diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-24 09:06:12 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-24 13:32:35 -0700 |
commit | ae805922b7e3cdaf3aee26c3b799fe3608669bba (patch) | |
tree | 2c428e9a5577eea2cc8a25da077f9043d558cc51 | |
parent | f66ba4f3579d69841176bfe7ced9df80eac57a80 (diff) |
Don't forget to add the declaration of our temporary variable for assigns.
Otherwise, dead code elimination gets confused since it relies on
seeing decls.
-rw-r--r-- | ast_to_hir.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index c70f0f9de9..25bbe2f2de 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -520,6 +520,7 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, * ends up not being used, the temp will get copy-propagated out. */ ir_variable *var = new ir_variable(rhs->type, "assignment_tmp"); + instructions->push_tail(var); instructions->push_tail(new ir_assignment(new ir_dereference_variable(var), rhs, NULL)); |