summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/basic_block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.cpp')
-rw-r--r--src/shader_recompiler/frontend/ir/basic_block.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.cpp b/src/shader_recompiler/frontend/ir/basic_block.cpp
index 249251dd0..1a5d82135 100644
--- a/src/shader_recompiler/frontend/ir/basic_block.cpp
+++ b/src/shader_recompiler/frontend/ir/basic_block.cpp
@@ -14,7 +14,8 @@
14 14
15namespace Shader::IR { 15namespace Shader::IR {
16 16
17Block::Block(u32 begin, u32 end) : location_begin{begin}, location_end{end} {} 17Block::Block(ObjectPool<Inst>& inst_pool_, u32 begin, u32 end)
18 : inst_pool{&inst_pool_}, location_begin{begin}, location_end{end} {}
18 19
19Block::~Block() = default; 20Block::~Block() = default;
20 21
@@ -24,7 +25,7 @@ void Block::AppendNewInst(Opcode op, std::initializer_list<Value> args) {
24 25
25Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op, 26Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op,
26 std::initializer_list<Value> args, u64 flags) { 27 std::initializer_list<Value> args, u64 flags) {
27 Inst* const inst{std::construct_at(instruction_alloc_pool.allocate(), op, flags)}; 28 Inst* const inst{inst_pool->Create(op, flags)};
28 const auto result_it{instructions.insert(insertion_point, *inst)}; 29 const auto result_it{instructions.insert(insertion_point, *inst)};
29 30
30 if (inst->NumArgs() != args.size()) { 31 if (inst->NumArgs() != args.size()) {