r600/sfn: Add interface to count AR uses in ALU op
authorGert Wollny <gert.wollny@collabora.com>
Fri, 10 Feb 2023 15:18:57 +0000 (16:18 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 28 Apr 2023 13:13:55 +0000 (13:13 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21347>

src/gallium/drivers/r600/sfn/sfn_instr_alu.h

index 75c0e88..3a5271e 100644 (file)
@@ -188,6 +188,9 @@ public:
    uint8_t allowed_src_chan_mask() const override;
    uint8_t allowed_dest_chan_mask() const {return m_allowed_desk_mask;}
 
+   void inc_ar_uses() { ++m_num_ar_uses;}
+   auto num_ar_uses() const {return m_num_ar_uses;}
+
 private:
    friend class AluGroup;
 
@@ -223,6 +226,7 @@ private:
    std::set<PRegister, std::less<PRegister>, Allocator<PRegister>> m_extra_dependencies;
    AluGroup *m_parent_group{nullptr};
    unsigned m_allowed_desk_mask{0xf};
+   unsigned m_num_ar_uses{0};
 };
 
 class AluInstrVisitor : public InstrVisitor {