void
ir_constant_visitor::visit(ir_expression *ir)
{
- void *ctx = talloc_parent(ir);
value = NULL;
ir_constant *op[2];
unsigned int operand, c;
return;
}
+ void *ctx = talloc_parent(ir);
this->value = new(ctx) ir_constant(ir->type, &data);
}
void
ir_constant_visitor::visit(ir_swizzle *ir)
{
- void *ctx = talloc_parent(ir);
ir_constant *v = ir->val->constant_expression_value();
this->value = NULL;
}
}
+ void *ctx = talloc_parent(ir);
this->value = new(ctx) ir_constant(ir->type, &data);
}
}
variable_entry *
ir_dead_code_visitor::get_variable_entry(ir_variable *var)
{
- void *ctx = talloc_parent(var);
assert(var);
foreach_iter(exec_list_iterator, iter, this->variable_list) {
variable_entry *entry = (variable_entry *)iter.get();
return entry;
}
+ void *ctx = talloc_parent(var);
+
variable_entry *entry = new(ctx) variable_entry(var);
this->variable_list.push_tail(entry);
return entry;
ir_rvalue *
ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
{
- void *ctx = talloc_parent(ir);
ir_dereference_array *deref = ir->as_dereference_array();
ir_constant *ir_constant;
if (!ir_constant)
return ir;
+ void *ctx = talloc_parent(ir);
this->progress = true;
return new(ctx) ir_swizzle(deref->array,
ir_constant->value.i[0], 0, 0, 0, 1);