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/basic_block.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/basic_block.h')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.h b/src/shader_recompiler/frontend/ir/basic_block.h index ec4a41cb1..ec3ad6263 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.h +++ b/src/shader_recompiler/frontend/ir/basic_block.h | |||
| @@ -10,9 +10,9 @@ | |||
| 10 | #include <vector> | 10 | #include <vector> |
| 11 | 11 | ||
| 12 | #include <boost/intrusive/list.hpp> | 12 | #include <boost/intrusive/list.hpp> |
| 13 | #include <boost/pool/pool_alloc.hpp> | ||
| 14 | 13 | ||
| 15 | #include "shader_recompiler/frontend/ir/microinstruction.h" | 14 | #include "shader_recompiler/frontend/ir/microinstruction.h" |
| 15 | #include "shader_recompiler/object_pool.h" | ||
| 16 | 16 | ||
| 17 | namespace Shader::IR { | 17 | namespace Shader::IR { |
| 18 | 18 | ||
| @@ -25,7 +25,7 @@ public: | |||
| 25 | using reverse_iterator = InstructionList::reverse_iterator; | 25 | using reverse_iterator = InstructionList::reverse_iterator; |
| 26 | using const_reverse_iterator = InstructionList::const_reverse_iterator; | 26 | using const_reverse_iterator = InstructionList::const_reverse_iterator; |
| 27 | 27 | ||
| 28 | explicit Block(u32 begin, u32 end); | 28 | explicit Block(ObjectPool<Inst>& inst_pool_, u32 begin, u32 end); |
| 29 | ~Block(); | 29 | ~Block(); |
| 30 | 30 | ||
| 31 | Block(const Block&) = delete; | 31 | Block(const Block&) = delete; |
| @@ -119,6 +119,8 @@ public: | |||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | private: | 121 | private: |
| 122 | /// Memory pool for instruction list | ||
| 123 | ObjectPool<Inst>* inst_pool; | ||
| 122 | /// Starting location of this block | 124 | /// Starting location of this block |
| 123 | u32 location_begin; | 125 | u32 location_begin; |
| 124 | /// End location of this block | 126 | /// End location of this block |
| @@ -127,11 +129,6 @@ private: | |||
| 127 | /// List of instructions in this block | 129 | /// List of instructions in this block |
| 128 | InstructionList instructions; | 130 | InstructionList instructions; |
| 129 | 131 | ||
| 130 | /// Memory pool for instruction list | ||
| 131 | boost::fast_pool_allocator<Inst, boost::default_user_allocator_malloc_free, | ||
| 132 | boost::details::pool::null_mutex> | ||
| 133 | instruction_alloc_pool; | ||
| 134 | |||
| 135 | /// Block immediate predecessors | 132 | /// Block immediate predecessors |
| 136 | std::vector<IR::Block*> imm_predecessors; | 133 | std::vector<IR::Block*> imm_predecessors; |
| 137 | }; | 134 | }; |