Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization: PHI Instruction Improvement #1142

Closed
tgiphil opened this issue Sep 13, 2023 · 0 comments · Fixed by #1145
Closed

Optimization: PHI Instruction Improvement #1142

tgiphil opened this issue Sep 13, 2023 · 0 comments · Fixed by #1145
Assignees

Comments

@tgiphil
Copy link
Member

tgiphil commented Sep 13, 2023

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()

@tgiphil tgiphil self-assigned this Sep 13, 2023
tgiphil added a commit to tgiphil/MOSA-Project that referenced this issue Sep 16, 2023
@tgiphil tgiphil linked a pull request Sep 16, 2023 that will close this issue
tgiphil added a commit to tgiphil/MOSA-Project that referenced this issue Sep 16, 2023
tgiphil added a commit that referenced this issue Sep 16, 2023
* - Additional shift/division optimizations

* - Additional optimizations

* - Additional optimizations

* - WIP

* - WIP

* - WIP

* - WIP

* - Implement #1142 (Phi improvement)

* - Implement #1142 (Phi improvement)

* - WIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant