Add a virtual clone() method to ir_instruction.

This will be used by function inlining, the linker, and avoiding double
usage of the LHS deref chains in ++, *=, and similar operations.
This commit is contained in:
Eric Anholt
2010-06-23 11:37:12 -07:00
committed by Ian Romanick
parent 02fc4b34e4
commit 4b6fd39c89
10 changed files with 305 additions and 328 deletions
+2 -2
View File
@@ -334,9 +334,9 @@ read_instruction(_mesa_glsl_parse_state *st, s_expression *expr,
s_symbol *symbol = SX_AS_SYMBOL(expr);
if (symbol != NULL) {
if (strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL)
return new ir_loop_jump(loop_ctx, ir_loop_jump::jump_break);
return new ir_loop_jump(ir_loop_jump::jump_break);
if (strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL)
return new ir_loop_jump(loop_ctx, ir_loop_jump::jump_continue);
return new ir_loop_jump(ir_loop_jump::jump_continue);
}
s_list *list = SX_AS_LIST(expr);