mosa/MOSA-Project

Optimization: PHI Instruction Improvement

tgiphil opened this issue · 0 comments

When exiting SSA form and removing the PHI instructions, rather than inserting a move instruction instead:

When the source move operand is only defined once, replace the defining instruction result operand with the move destination operand instead.

This will avoid useless move instructions and provide better form for the register allocator.

Example:

LoopTests::Loop0()