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

Optimize jumps to unconditional jumps #42

Open
grassator opened this issue May 25, 2021 · 0 comments
Open

Optimize jumps to unconditional jumps #42

grassator opened this issue May 25, 2021 · 0 comments
Labels
runtime performance Making compiled user programs faster

Comments

@grassator
Copy link
Owner

When we have code like this, jmp L1 should be changed to jmp L2:

jmp L1
...
L1:
jmp L2
...
L2:

This can happen for multiple hops as long as the jump is unconditional.

Original jump can conditional so this is also optimizable:

test rax, rax
je L1
...
L1:
jmp L2
...
L2:
@grassator grassator added the runtime performance Making compiled user programs faster label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime performance Making compiled user programs faster
Projects
None yet
Development

No branches or pull requests

1 participant