diff options
| author | 2021-10-31 17:46:46 +0100 | |
|---|---|---|
| committer | 2021-10-31 19:34:15 +0100 | |
| commit | c50ad56bf59169bd0fc808ebecfb4a69376f10df (patch) | |
| tree | 56b4c044f6116a092370438c89b96e1400ad363a /src/shader_recompiler/frontend/ir/basic_block.h | |
| parent | Merge pull request #6702 from lat9nq/disable-screensaver (diff) | |
| download | yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.gz yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.tar.xz yuzu-c50ad56bf59169bd0fc808ebecfb4a69376f10df.zip | |
ShaderCache: Order Phi Arguments from farthest away to nearest.
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.h')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.h b/src/shader_recompiler/frontend/ir/basic_block.h index 7e134b4c7..9ce1ed07e 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.h +++ b/src/shader_recompiler/frontend/ir/basic_block.h | |||
| @@ -152,6 +152,17 @@ public: | |||
| 152 | return instructions.crend(); | 152 | return instructions.crend(); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | // Set the order of the block, it can be set pre order, the user decides | ||
| 156 | void SetOrder(u32 new_order) { | ||
| 157 | order = new_order; | ||
| 158 | } | ||
| 159 | |||
| 160 | // Get the order of the block. | ||
| 161 | // The higher, the closer is the block to the end. | ||
| 162 | [[nodiscard]] u32 GetOrder() const { | ||
| 163 | return order; | ||
| 164 | } | ||
| 165 | |||
| 155 | private: | 166 | private: |
| 156 | /// Memory pool for instruction list | 167 | /// Memory pool for instruction list |
| 157 | ObjectPool<Inst>* inst_pool; | 168 | ObjectPool<Inst>* inst_pool; |
| @@ -171,6 +182,9 @@ private: | |||
| 171 | 182 | ||
| 172 | /// Intrusively stored host definition of this block. | 183 | /// Intrusively stored host definition of this block. |
| 173 | u32 definition{}; | 184 | u32 definition{}; |
| 185 | |||
| 186 | /// Order of the block. | ||
| 187 | u32 order{}; | ||
| 174 | }; | 188 | }; |
| 175 | 189 | ||
| 176 | using BlockList = std::vector<Block*>; | 190 | using BlockList = std::vector<Block*>; |