r600/sfn: Add function to insert op in block
authorGert Wollny <gert.wollny@collabora.com>
Fri, 10 Feb 2023 15:12:05 +0000 (16:12 +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.cpp
src/gallium/drivers/r600/sfn/sfn_instr.h

index 4205e0f..b539c37 100644 (file)
@@ -342,6 +342,12 @@ Block::push_back(PInst instr)
    m_instructions.push_back(instr);
 }
 
+Block::iterator
+Block::insert(const iterator pos, Instr *instr)
+{
+   return m_instructions.insert(pos, instr);
+}
+
 bool
 Block::try_reserve_kcache(const AluGroup& group)
 {
index 26b35f3..c8ca38f 100644 (file)
@@ -191,6 +191,8 @@ public:
 
    void erase(iterator node);
 
+   iterator insert(const iterator pos, Instr *instr);
+
    bool is_equal_to(const Block& lhs) const;
 
    void accept(ConstInstrVisitor& visitor) const override;