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

Add an if instruction to JuvixReg #2855

Merged
merged 15 commits into from
Jun 26, 2024
Merged

Add an if instruction to JuvixReg #2855

merged 15 commits into from
Jun 26, 2024

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Jun 24, 2024

  • Closes Add an if instruction to JuvixReg #2829
  • Adds a transformation which converts br to if when the variable branched on was assigned in the previous instruction. The transformation itself doesn't check liveness and doesn't remove the assignment. Dead code elimination should be run afterwards to remove the assignment.
  • For Cairo, it only makes sense to convert br to if for equality comparisons against zero. The assignment before br will always become dead after converting br to if, because we convert to SSA before.

@lukaszcz lukaszcz added this to the 0.6.3 milestone Jun 24, 2024
@lukaszcz lukaszcz self-assigned this Jun 24, 2024
@lukaszcz lukaszcz force-pushed the reg-if branch 3 times, most recently from 53a226e to 7ea22ad Compare June 25, 2024 18:06
@lukaszcz lukaszcz marked this pull request as ready for review June 25, 2024 18:06
@lukaszcz lukaszcz merged commit 4dcbb00 into main Jun 26, 2024
4 checks passed
@lukaszcz lukaszcz deleted the reg-if branch June 26, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an if instruction to JuvixReg
2 participants