diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-06 03:11:23 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:21 +0200 |
commit | 16cb00c521cae6e93ec49d10e15b575b7bc4857e (patch) | |
tree | 3b283895510af56fced7e62031c6beda999c0a1c /src/shader_recompiler/frontend/ir/basic_block.cpp | |
parent | shader: Make typed IR (diff) | |
download | yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.gz yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.bz2 yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.lz yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.xz yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.zst yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.cpp | 5 |
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 @@ namespace Shader::IR { -Block::Block(u32 begin, u32 end) : location_begin{begin}, location_end{end} {} +Block::Block(ObjectPool<Inst>& inst_pool_, u32 begin, u32 end) + : inst_pool{&inst_pool_}, location_begin{begin}, location_end{end} {} Block::~Block() = default; @@ -24,7 +25,7 @@ void Block::AppendNewInst(Opcode op, std::initializer_list<Value> args) { Block::iterator Block::PrependNewInst(iterator insertion_point, Opcode op, std::initializer_list<Value> args, u64 flags) { - Inst* const inst{std::construct_at(instruction_alloc_pool.allocate(), op, flags)}; + Inst* const inst{inst_pool->Create(op, flags)}; const auto result_it{instructions.insert(insertion_point, *inst)}; if (inst->NumArgs() != args.size()) { |