-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-93223: More aggressive Jump-To-Jump elimination #93229
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
Conversation
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=84, starts_line=8, is_jump_target=False, positions=None), | ||
Instruction(opname='JUMP_FORWARD', opcode=110, arg=14, argval=116, argrepr='to 116', offset=86, starts_line=None, is_jump_target=False, positions=None), | ||
Instruction(opname='JUMP_BACKWARD', opcode=140, arg=31, argval=28, argrepr='to 28', offset=88, starts_line=7, is_jump_target=True, positions=None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This instruction gets deleted altogether
@@ -1392,100 +1392,99 @@ def _prepare_test_cases(): | |||
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=72, starts_line=7, is_jump_target=True, positions=None), | |||
Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=74, starts_line=None, is_jump_target=False, positions=None), | |||
Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=76, starts_line=None, is_jump_target=False, positions=None), | |||
Instruction(opname='POP_JUMP_FORWARD_IF_FALSE', opcode=114, arg=2, argval=88, argrepr='to 88', offset=82, starts_line=None, is_jump_target=False, positions=None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This jump-to-jump gets folded together
Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=262, starts_line=None, is_jump_target=False, positions=None), | ||
Instruction(opname='CALL', opcode=171, arg=2, argval=2, argrepr='', offset=264, starts_line=None, is_jump_target=False, positions=None), | ||
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=274, starts_line=None, is_jump_target=False, positions=None), | ||
Instruction(opname='JUMP_FORWARD', opcode=110, arg=11, argval=300, argrepr='to 300', offset=276, starts_line=None, is_jump_target=False, positions=None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A jump-to-jump gets eliminated here
My only concern with this PR is that I would like to remove all backwards conditional jumps: faster-cpython/ideas#297 (comment). |
#93223