glsl/ir_builder: Eliminate unused conditional assignment builders

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14573>
This commit is contained in:
Ian Romanick 2022-01-14 17:20:00 -08:00 committed by Marge Bot
parent 46a9df6aac
commit c3626e1580
2 changed files with 7 additions and 21 deletions

View file

@ -45,19 +45,6 @@ ir_factory::make_temp(const glsl_type *type, const char *name)
return var;
}
ir_assignment *
assign(deref lhs, operand rhs, operand condition, int writemask)
{
void *mem_ctx = ralloc_parent(lhs.val);
ir_assignment *assign = new(mem_ctx) ir_assignment(lhs.val,
rhs.val,
condition.val,
writemask);
return assign;
}
ir_assignment *
assign(deref lhs, operand rhs)
{
@ -67,13 +54,14 @@ assign(deref lhs, operand rhs)
ir_assignment *
assign(deref lhs, operand rhs, int writemask)
{
return assign(lhs, rhs, (ir_rvalue *) NULL, writemask);
}
void *mem_ctx = ralloc_parent(lhs.val);
ir_assignment *
assign(deref lhs, operand rhs, operand condition)
{
return assign(lhs, rhs, condition, (1 << lhs.val->type->vector_elements) - 1);
ir_assignment *assign = new(mem_ctx) ir_assignment(lhs.val,
rhs.val,
NULL,
writemask);
return assign;
}
ir_return *

View file

@ -125,8 +125,6 @@ public:
ir_assignment *assign(deref lhs, operand rhs);
ir_assignment *assign(deref lhs, operand rhs, int writemask);
ir_assignment *assign(deref lhs, operand rhs, operand condition);
ir_assignment *assign(deref lhs, operand rhs, operand condition, int writemask);
ir_return *ret(operand retval);