Mesa (main): glsl: Eliminate unused conditional assignment constructor

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 11 17:59:12 UTC 2022


Module: Mesa
Branch: main
Commit: d27e3c6adcbfd7a627521912532c958a123b0a85
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d27e3c6adcbfd7a627521912532c958a123b0a85

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Jan 14 17:57:53 2022 -0800

glsl: Eliminate unused conditional assignment constructor

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14573>

---

 src/compiler/glsl/ir.cpp | 20 --------------------
 src/compiler/glsl/ir.h   |  3 ---
 2 files changed, 23 deletions(-)

diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index 8eda95eaf53..99e084593bd 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -149,26 +149,6 @@ ir_assignment::whole_variable_written()
    return v;
 }
 
-ir_assignment::ir_assignment(ir_dereference *lhs, ir_rvalue *rhs,
-			     ir_rvalue *condition, unsigned write_mask)
-   : ir_instruction(ir_type_assignment)
-{
-   this->condition = condition;
-   this->rhs = rhs;
-   this->lhs = lhs;
-   this->write_mask = write_mask;
-
-   if (lhs->type->is_scalar() || lhs->type->is_vector()) {
-      int lhs_components = 0;
-      for (int i = 0; i < 4; i++) {
-	 if (write_mask & (1 << i))
-	    lhs_components++;
-      }
-
-      assert(lhs_components == this->rhs->type->vector_elements);
-   }
-}
-
 ir_assignment::ir_assignment(ir_dereference *lhs, ir_rvalue *rhs,
                              unsigned write_mask)
    : ir_instruction(ir_type_assignment)
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
index b53f216ee9e..744e0fe6f74 100644
--- a/src/compiler/glsl/ir.h
+++ b/src/compiler/glsl/ir.h
@@ -1472,9 +1472,6 @@ public:
     * Since a write mask is supplied, the LHS must already be a bare
     * \c ir_dereference.  The cannot be any swizzles in the LHS.
     */
-   ir_assignment(ir_dereference *lhs, ir_rvalue *rhs, ir_rvalue *condition,
-		 unsigned write_mask);
-
    ir_assignment(ir_dereference *lhs, ir_rvalue *rhs, unsigned write_mask);
 
    virtual ir_assignment *clone(void *mem_ctx, struct hash_table *ht) const;



More information about the mesa-commit mailing list