Revert "i965/fs: Change fs_visitor::emit_lrp to use MAC for gen<6"
[mesa.git] / src / glsl / opt_array_splitting.cpp
index c7c5f6712659c554d4ee8bd250dfc340c1c7a7e1..97d3a57e994cee17574e9c3a105f45da18360188 100644 (file)
@@ -122,8 +122,8 @@ ir_array_reference_visitor::get_variable_entry(ir_variable *var)
 {
    assert(var);
 
-   if (var->mode != ir_var_auto &&
-       var->mode != ir_var_temporary)
+   if (var->data.mode != ir_var_auto &&
+       var->data.mode != ir_var_temporary)
       return NULL;
 
    if (!(var->type->is_array() || var->type->is_matrix()))
@@ -135,8 +135,8 @@ ir_array_reference_visitor::get_variable_entry(ir_variable *var)
    if (var->type->is_unsized_array())
       return NULL;
 
-   foreach_iter(exec_list_iterator, iter, this->variable_list) {
-      variable_entry *entry = (variable_entry *)iter.get();
+   foreach_list(n, &this->variable_list) {
+      variable_entry *entry = (variable_entry *) n;
       if (entry->var == var)
         return entry;
    }
@@ -224,8 +224,8 @@ ir_array_reference_visitor::get_split_list(exec_list *instructions,
    }
 
    /* Trim out variables we found that we can't split. */
-   foreach_iter(exec_list_iterator, iter, variable_list) {
-      variable_entry *entry = (variable_entry *)iter.get();
+   foreach_list_safe(n, &variable_list) {
+      variable_entry *entry = (variable_entry *) n;
 
       if (debug) {
         printf("array %s@%p: decl %d, split %d\n",
@@ -270,8 +270,8 @@ ir_array_splitting_visitor::get_splitting_entry(ir_variable *var)
 {
    assert(var);
 
-   foreach_iter(exec_list_iterator, iter, *this->variable_list) {
-      variable_entry *entry = (variable_entry *)iter.get();
+   foreach_list(n, this->variable_list) {
+      variable_entry *entry = (variable_entry *) n;
       if (entry->var == var) {
         return entry;
       }
@@ -368,8 +368,8 @@ optimize_split_arrays(exec_list *instructions, bool linked)
    /* Replace the decls of the arrays to be split with their split
     * components.
     */
-   foreach_iter(exec_list_iterator, iter, refs.variable_list) {
-      variable_entry *entry = (variable_entry *)iter.get();
+   foreach_list(n, &refs.variable_list) {
+      variable_entry *entry = (variable_entry *) n;
       const struct glsl_type *type = entry->var->type;
       const struct glsl_type *subtype;
 
@@ -400,7 +400,7 @@ optimize_split_arrays(exec_list *instructions, bool linked)
    visit_list_elements(&split, instructions);
 
    if (debug)
-      _mesa_print_ir(instructions, NULL);
+      _mesa_print_ir(stdout, instructions, NULL);
 
    ralloc_free(mem_ctx);