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

Author: Gert Wollny <[email protected]>
Date:   Fri Feb 26 21:24:01 2021 +0100

r600/sfn: remove unused emit_alu_op2_split_src_mods

Signed-off-by: Gert Wollny <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>

---

 .../drivers/r600/sfn/sfn_emitaluinstruction.cpp    | 64 ----------------------
 .../drivers/r600/sfn/sfn_emitaluinstruction.h      |  1 -
 2 files changed, 65 deletions(-)

diff --git a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp 
b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
index 662247edaab..37040581741 100644
--- a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
@@ -951,70 +951,6 @@ bool EmitAluInstruction::emit_alu_op2(const nir_alu_instr& 
instr, EAluOp opcode,
    return true;
 }
 
-bool EmitAluInstruction::emit_alu_op2_split_src_mods(const nir_alu_instr& 
instr, EAluOp opcode, AluOp2Opts ops)
-{
-   const nir_alu_src *src0 = &instr.src[0];
-   const nir_alu_src *src1 = &instr.src[1];
-
-   if (ops & op2_opt_reverse)
-      std::swap(src0, src1);
-
-   GPRVector::Values v0;
-   for (int i = 0; i < 4 ; ++i)
-      v0[i] = m_src[0][i];
-
-   GPRVector::Values v1;
-   for (int i = 0; i < 4 ; ++i)
-      v1[i] = m_src[1][i];
-
-   if (src0->abs ||   src0->negate) {
-      int src0_tmp = allocate_temp_register();
-      GPRVector::Values v0_temp;
-      AluInstruction *ir = nullptr;
-      for (int i = 0; i < 4 ; ++i) {
-         if (instr.dest.write_mask & (1 << i)) {
-            v0_temp[i] = PValue(new GPRValue(src0_tmp, i));
-            ir = new AluInstruction(op1_mov, v0_temp[i], v0[i], write);
-            if (src0->abs) ir->set_flag(alu_src0_abs);
-            if (src0->negate) ir->set_flag(alu_src0_neg);
-            emit_instruction(ir);
-            v0[i] = v0_temp[i];
-         }
-      }
-      if (ir)
-         ir->set_flag(alu_last_instr);
-   }
-
-   if (src1->abs || src1->negate) {
-      int src1_tmp = allocate_temp_register();
-      GPRVector::Values v1_temp;
-      AluInstruction *ir = nullptr;
-      for (int i = 0; i < 4 ; ++i) {
-         if (instr.dest.write_mask & (1 << i)) {
-            v1_temp[i] = PValue(new GPRValue(src1_tmp, i));
-            ir = new AluInstruction(op1_mov, v1_temp[i], v1[i], {alu_write});
-            if (src1->abs) ir->set_flag(alu_src0_abs);
-            if (src1->negate) ir->set_flag(alu_src0_neg);
-            emit_instruction(ir);
-            v1[i] = v1_temp[i];
-         }
-      }
-      if (ir)
-         ir->set_flag(alu_last_instr);
-   }
-
-   AluInstruction *ir = nullptr;
-   for (int i = 0; i < 4 ; ++i) {
-      if (instr.dest.write_mask & (1 << i)){
-         ir = new AluInstruction(opcode, from_nir(instr.dest, i), {v0[i], 
v1[i]}, {alu_write});
-         emit_instruction(ir);
-      }
-   }
-   if (ir)
-      ir->set_flag(alu_last_instr);
-   return true;
-}
-
 bool EmitAluInstruction::emit_alu_op3(const nir_alu_instr& instr, EAluOp 
opcode,
                                       std::array<uint8_t, 3> reorder)
 {
diff --git a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h 
b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
index 42f9d8f26f1..34bc139cf6f 100644
--- a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
+++ b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
@@ -56,7 +56,6 @@ private:
    bool emit_mov(const nir_alu_instr& instr);
    bool emit_alu_op1(const nir_alu_instr& instr, EAluOp opcode, const 
AluOpFlags &flags = 0);
    bool emit_alu_op2(const nir_alu_instr& instr, EAluOp opcode, AluOp2Opts ops 
= op2_opt_none);
-   bool emit_alu_op2_split_src_mods(const nir_alu_instr& instr, EAluOp opcode, 
AluOp2Opts ops = op2_opt_none);
 
    bool emit_alu_trans_op2(const nir_alu_instr& instr, EAluOp opcode);
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to