glsl: Remove useless iteration through function parameters.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 22 Nov 2013 11:38:26 +0000 (03:38 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 1 Dec 2013 23:32:55 +0000 (15:32 -0800)
There's no need to loop through the "parameters" list and remove every
element; move_nodes_to(&parameters) already throws away all elements of
the destination list.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ir.cpp

index ffff2976aa4aaf90502a8930b71be9a3196de3b5..3be7d51707a48df8e65c52eebf03523953dab7ab 100644 (file)
@@ -1729,12 +1729,6 @@ ir_function_signature::replace_parameters(exec_list *new_params)
     * parameter information comes from the function prototype, it may either
     * specify incorrect parameter names or not have names at all.
     */
-   foreach_iter(exec_list_iterator, iter, parameters) {
-      assert(((ir_instruction *) iter.get())->as_variable() != NULL);
-
-      iter.remove();
-   }
-
    new_params->move_nodes_to(&parameters);
 }