mass icon indicating copy to clipboard operation
mass copied to clipboard

Optimize jumps to unconditional jumps

Open grassator opened this issue 4 years ago • 0 comments

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 avatar May 25 '21 23:05 grassator