diff options
| author | 2021-02-05 23:11:23 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:21 -0400 | |
| commit | 16cb00c521cae6e93ec49d10e15b575b7bc4857e (patch) | |
| tree | 3b283895510af56fced7e62031c6beda999c0a1c /src/shader_recompiler/frontend/ir/function.h | |
| parent | shader: Make typed IR (diff) | |
| download | yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.gz yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.xz yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.zip | |
shader: Add pools and rename files
Diffstat (limited to 'src/shader_recompiler/frontend/ir/function.h')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/function.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/shader_recompiler/frontend/ir/function.h b/src/shader_recompiler/frontend/ir/function.h index 2d4dc5b98..bba7d1d39 100644 --- a/src/shader_recompiler/frontend/ir/function.h +++ b/src/shader_recompiler/frontend/ir/function.h | |||
| @@ -4,22 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <boost/container/small_vector.hpp> |
| 8 | #include <vector> | ||
| 9 | 8 | ||
| 10 | #include "shader_recompiler/frontend/ir/basic_block.h" | 9 | #include "shader_recompiler/frontend/ir/basic_block.h" |
| 11 | 10 | ||
| 12 | namespace Shader::IR { | 11 | namespace Shader::IR { |
| 13 | 12 | ||
| 14 | struct Function { | 13 | struct Function { |
| 15 | struct InplaceDelete { | 14 | boost::container::small_vector<Block*, 16> blocks; |
| 16 | void operator()(IR::Block* block) const noexcept { | ||
| 17 | std::destroy_at(block); | ||
| 18 | } | ||
| 19 | }; | ||
| 20 | using UniqueBlock = std::unique_ptr<IR::Block, InplaceDelete>; | ||
| 21 | |||
| 22 | std::vector<UniqueBlock> blocks; | ||
| 23 | }; | 15 | }; |
| 24 | 16 | ||
| 25 | } // namespace Shader::IR | 17 | } // namespace Shader::IR |