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
This commit is contained in:
FICTURE7 2021-05-17 03:54:53 +04:00 committed by GitHub
parent 212e472c9f
commit c805542b29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 47 additions and 16 deletions

View file

@ -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)
{