diff options
Diffstat (limited to 'src/shader_recompiler/frontend/ir/basic_block.h')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/basic_block.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/basic_block.h b/src/shader_recompiler/frontend/ir/basic_block.h index 6a1d615d9..3a4230755 100644 --- a/src/shader_recompiler/frontend/ir/basic_block.h +++ b/src/shader_recompiler/frontend/ir/basic_block.h | |||
| @@ -101,6 +101,13 @@ public: | |||
| 101 | return branch_false; | 101 | return branch_false; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | void SetSsaRegValue(IR::Reg reg, const Value& value) noexcept { | ||
| 105 | ssa_reg_values[RegIndex(reg)] = value; | ||
| 106 | } | ||
| 107 | const Value& SsaRegValue(IR::Reg reg) const noexcept { | ||
| 108 | return ssa_reg_values[RegIndex(reg)]; | ||
| 109 | } | ||
| 110 | |||
| 104 | [[nodiscard]] bool empty() const { | 111 | [[nodiscard]] bool empty() const { |
| 105 | return instructions.empty(); | 112 | return instructions.empty(); |
| 106 | } | 113 | } |
| @@ -182,6 +189,9 @@ private: | |||
| 182 | /// Block immediate predecessors | 189 | /// Block immediate predecessors |
| 183 | std::vector<Block*> imm_predecessors; | 190 | std::vector<Block*> imm_predecessors; |
| 184 | 191 | ||
| 192 | /// Intrusively store the value of a register in the block. | ||
| 193 | std::array<Value, NUM_REGS> ssa_reg_values; | ||
| 194 | |||
| 185 | /// Intrusively stored host definition of this block. | 195 | /// Intrusively stored host definition of this block. |
| 186 | u32 definition{}; | 196 | u32 definition{}; |
| 187 | }; | 197 | }; |