Everything from code generation to register allocation has turned out to be much, much easier if we only allow lir::Registers in the arguments to calls and returns. The major benefit of doing it this way is that we don't have to worry about which registers we can and cannot clobber in the code generator; instead it is free to just ignore the arguments or parameters all together since any necessary moves or shuffles are inserted beforehand.
The backend should therefore use this technique for all kinds of arguments, including un/conditional jumps.
Also worth noting that the lir::Branch::JumpIf lets the then and elze branch take different numbers of registers. This makes the above registirification impractical, so that should be fixed too.
Everything from code generation to register allocation has turned out to be much, much easier if we only allow
lir::Register
s in the arguments to calls and returns. The major benefit of doing it this way is that we don't have to worry about which registers we can and cannot clobber in the code generator; instead it is free to just ignore the arguments or parameters all together since any necessary moves or shuffles are inserted beforehand.The backend should therefore use this technique for all kinds of arguments, including un/conditional jumps.