glsl: Slight change to the code generated by if-flattening
[mesa.git] / src / glsl / ir_variable_refcount.h
index d69cab563e21bb0cbab6f151a9695a782c74f779..906135a9e1e370ad2d7bf64c65e864ccb58ec221 100644 (file)
 class variable_entry : public exec_node
 {
 public:
-   variable_entry(ir_variable *var)
-   {
-      this->var = var;
-      assign = NULL;
-      referenced_count = 0;
-      assigned_count = 0;
-      declaration = false;
-   }
+   variable_entry(ir_variable *var);
 
    ir_variable *var; /* The key: the variable's pointer. */
    ir_assignment *assign; /* An assignment to the variable, if any */
@@ -61,13 +54,13 @@ class ir_variable_refcount_visitor : public ir_hierarchical_visitor {
 public:
    ir_variable_refcount_visitor(void)
    {
-      this->mem_ctx = talloc_new(NULL);
+      this->mem_ctx = ralloc_context(NULL);
       this->variable_list.make_empty();
    }
 
    ~ir_variable_refcount_visitor(void)
    {
-      this->mem_ctx = talloc_new(NULL);
+      ralloc_free(this->mem_ctx);
    }
 
    virtual ir_visitor_status visit(ir_variable *);
@@ -78,8 +71,6 @@ public:
 
    variable_entry *get_variable_entry(ir_variable *var);
 
-   bool (*predicate)(ir_instruction *ir);
-
    /* List of variable_entry */
    exec_list variable_list;