nir: Use a single list for all shader variables
[mesa.git] / src / compiler / glsl / loop_analysis.h
index 99b6bf756389db3b3400cedd6ecbf589cbf924f6..d6fdb908e0d668c88f063bdec92c42b5fd36998e 100644 (file)
@@ -55,7 +55,7 @@ public:
    class loop_variable *get(const ir_variable *);
    class loop_variable *insert(ir_variable *);
    class loop_variable *get_or_insert(ir_variable *, bool in_assignee);
-   class loop_terminator *insert(ir_if *);
+   class loop_terminator *insert(ir_if *, bool continue_from_then);
 
 
    /**
@@ -113,8 +113,7 @@ public:
    {
       this->num_loop_jumps = 0;
       this->contains_calls = false;
-      this->var_hash = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
-                                               _mesa_key_pointer_equal);
+      this->var_hash = _mesa_pointer_hash_table_create(NULL);
       this->limiting_terminator = NULL;
    }
 
@@ -210,6 +209,9 @@ public:
     * terminate the loop (if that is a fixed value).  Otherwise -1.
     */
    int iterations;
+
+   /* Does the if continue from the then branch or the else branch */
+   bool continue_from_then;
 };