diff options
| author | 2021-05-25 02:34:08 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:33 -0400 | |
| commit | 379b305b4bc09799d53981fa6e5d9cbe6be99561 (patch) | |
| tree | ad68c6c457f76ba38249fdb39abbdb7b5cdbea26 /src/shader_recompiler/backend/glasm/reg_alloc.h | |
| parent | glasm: Catch more register leaks (diff) | |
| download | yuzu-379b305b4bc09799d53981fa6e5d9cbe6be99561.tar.gz yuzu-379b305b4bc09799d53981fa6e5d9cbe6be99561.tar.xz yuzu-379b305b4bc09799d53981fa6e5d9cbe6be99561.zip | |
glasm: Throw when there are register leaks
Diffstat (limited to 'src/shader_recompiler/backend/glasm/reg_alloc.h')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/reg_alloc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h index b97c84146..019e1bc0f 100644 --- a/src/shader_recompiler/backend/glasm/reg_alloc.h +++ b/src/shader_recompiler/backend/glasm/reg_alloc.h | |||
| @@ -128,6 +128,10 @@ public: | |||
| 128 | return num_used_long_registers; | 128 | return num_used_long_registers; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | [[nodiscard]] bool IsEmpty() const noexcept { | ||
| 132 | return register_use.none() && long_register_use.none(); | ||
| 133 | } | ||
| 134 | |||
| 131 | /// Returns true if the instruction is expected to be aliased to another | 135 | /// Returns true if the instruction is expected to be aliased to another |
| 132 | static bool IsAliased(const IR::Inst& inst); | 136 | static bool IsAliased(const IR::Inst& inst); |
| 133 | 137 | ||