Browse Source

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.
tags/mesa-7.9-rc1
Eric Anholt 15 years ago
parent
commit
ae805922b7
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      ast_to_hir.cpp

+ 1
- 0
ast_to_hir.cpp View File

@@ -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));

Loading…
Cancel
Save