From c805542b29975b0d9bf3ea324526f62cfe4331bf Mon Sep 17 00:00:00 2001 From: FICTURE7 Date: Mon, 17 May 2021 03:54:53 +0400 Subject: Allow `LocalVariable` to be assigned more than once (#2288) * Allow `LocalVariable` to be assigned more than once This allows us to write flow controls like loops and if-elses with LocalVariables participating in phi nodes. * Add `GetLocalNumber` to operand --- ARMeilleure/CodeGen/RegisterAllocators/LinearScanAllocator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ARMeilleure/CodeGen/RegisterAllocators/LinearScanAllocator.cs') diff --git a/ARMeilleure/CodeGen/RegisterAllocators/LinearScanAllocator.cs b/ARMeilleure/CodeGen/RegisterAllocators/LinearScanAllocator.cs index cd36bdc0..88adeeb0 100644 --- a/ARMeilleure/CodeGen/RegisterAllocators/LinearScanAllocator.cs +++ b/ARMeilleure/CodeGen/RegisterAllocators/LinearScanAllocator.cs @@ -976,7 +976,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators { if (operand.Kind == OperandKind.LocalVariable) { - return operand.AsInt32(); + return operand.GetLocalNumber(); } else if (operand.Kind == OperandKind.Register) { -- cgit v1.2.3