Mesa (main): glsl/ir_builder: Eliminate unused conditional assignment builders
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 11 17:59:12 UTC 2022
Module: Mesa
Branch: main
Commit: c3626e1580079585869a8a6cffa449b9f2a1331a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3626e1580079585869a8a6cffa449b9f2a1331a
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Fri Jan 14 17:20:00 2022 -0800
glsl/ir_builder: Eliminate unused conditional assignment builders
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14573>
---
src/compiler/glsl/ir_builder.cpp | 26 +++++++-------------------
src/compiler/glsl/ir_builder.h | 2 --
2 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/src/compiler/glsl/ir_builder.cpp b/src/compiler/glsl/ir_builder.cpp
index 416d8c71ed1..998fea1e464 100644
--- a/src/compiler/glsl/ir_builder.cpp
+++ b/src/compiler/glsl/ir_builder.cpp
@@ -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 *
diff --git a/src/compiler/glsl/ir_builder.h b/src/compiler/glsl/ir_builder.h
index 9309039f9de..2a1d3643e56 100644
--- a/src/compiler/glsl/ir_builder.h
+++ b/src/compiler/glsl/ir_builder.h
@@ -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);
More information about the mesa-commit
mailing list