summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/reg_alloc.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-10 08:47:31 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commitdeda89372f78dc78b37e941bf86e3026708e3ea2 (patch)
tree070a356b32b84b57b9ef409869e2476b57c00bfb /src/shader_recompiler/backend/glasm/reg_alloc.h
parentglasm: Implement SelectU64 on GLASM (diff)
downloadyuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.tar
yuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.tar.gz
yuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.tar.bz2
yuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.tar.lz
yuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.tar.xz
yuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.tar.zst
yuzu-deda89372f78dc78b37e941bf86e3026708e3ea2.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm/reg_alloc.h')
-rw-r--r--src/shader_recompiler/backend/glasm/reg_alloc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h
index 8df73ca18..5742436cf 100644
--- a/src/shader_recompiler/backend/glasm/reg_alloc.h
+++ b/src/shader_recompiler/backend/glasm/reg_alloc.h
@@ -99,8 +99,12 @@ public:
Register LongDefine(IR::Inst& inst);
+ [[nodiscard]] Value Peek(const IR::Value& value);
+
Value Consume(const IR::Value& value);
+ void Unref(IR::Inst& inst);
+
[[nodiscard]] Register AllocReg();
[[nodiscard]] Register AllocLongReg();
@@ -123,9 +127,13 @@ private:
static constexpr size_t NUM_REGS = 4096;
static constexpr size_t NUM_ELEMENTS = 4;
+ Value MakeImm(const IR::Value& value);
+
Register Define(IR::Inst& inst, bool is_long);
- Value Consume(IR::Inst& inst);
+ Value PeekInst(IR::Inst& inst);
+
+ Value ConsumeInst(IR::Inst& inst);
Id Alloc(bool is_long);