From 3136a5e2f82f61bd1dbae798e1962fdcb018f07d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 16 May 2025 14:36:56 -0400 Subject: [PATCH] IR: add helpers to extract physical registers from IR Signed-off-by: Alyssa Rosenzweig --- FEXCore/Source/Interface/IR/RegisterAllocationData.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FEXCore/Source/Interface/IR/RegisterAllocationData.h b/FEXCore/Source/Interface/IR/RegisterAllocationData.h index 205293d1c..866ed1326 100644 --- a/FEXCore/Source/Interface/IR/RegisterAllocationData.h +++ b/FEXCore/Source/Interface/IR/RegisterAllocationData.h @@ -24,6 +24,12 @@ union PhysicalRegister { : Reg(Reg) , Class(Class.Val) {} + PhysicalRegister(OrderedNodeWrapper Arg) + : Raw(Arg.GetImmediate()) {} + + PhysicalRegister(Ref Node) + : Raw(Node->Reg) {} + static const PhysicalRegister Invalid() { return PhysicalRegister(InvalidClass, InvalidReg); }