summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/basic_block.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-02-05 23:11:23 -0300
committerGravatar ameerj2021-07-22 21:51:21 -0400
commit16cb00c521cae6e93ec49d10e15b575b7bc4857e (patch)
tree3b283895510af56fced7e62031c6beda999c0a1c /src/shader_recompiler/frontend/ir/basic_block.cpp
parentshader: Make typed IR (diff)
downloadyuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.gz
yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.xz
yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.zip
shader: Add pools and rename files
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()) {