glsl2: Replace insert_before/remove pairs with exec_node::replace_with.

This commit is contained in:
Kenneth Graunke
2010-07-19 21:44:03 -07:00
parent d5be2acae3
commit c7a18da690
6 changed files with 7 additions and 14 deletions
+1 -2
View File
@@ -91,8 +91,7 @@ replace_return_with_assignment(ir_instruction *ir, void *data)
if (ret) {
if (ret->value) {
ir_rvalue *lhs = new(ctx) ir_dereference_variable(retval);
ret->insert_before(new(ctx) ir_assignment(lhs, ret->value, NULL));
ret->remove();
ret->replace_with(new(ctx) ir_assignment(lhs, ret->value, NULL));
} else {
/* un-valued return has to be the last return, or we shouldn't
* have reached here. (see can_inline()).