-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
GH-118093: Add tier two support to several instructions #121884
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
GH-118093: Add tier two support to several instructions #121884
Conversation
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.
One minor clarification needed, otherwise LGTM.
Regarding handling CALL_LIST_APPEND
in tier 2:
Instead of asserting that the next instruction is POP_TOP
and skipping it, we could emit a LOAD_CONST_BORROW None
.
If the following instruction is not POP_TOP
then then code is still correct. If there is a POP_TOP
following, then optimizer will eliminate the LOAD; POP_TOP
.
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again |
Thanks for making the requested changes! @markshannon: please review the changes made to this pull request. |
JIT failures are unrelated: GH-121946 |
This adds tier two support to all of the the trivial instructions that our stats indicate are causing traces to end (
CALL_LIST_APPEND
,IMPORT_NAME
,LOAD_NAME
,BUILD_SET
,SEND_GEN
, andIMPORT_FROM
). Some other, more complicated, instructions will come in their own PRs. It also turns_FOR_ITER_TIER_TWO
from a deopting instruction into an exiting instruction, since we expect it to fail fairly often (since this represents normal control flow in the program).Perf is neutral. Stats have improved, as expected (4% fewer tier one instructions, 24% fewer too-short traces, 20% fewer optimization attempts, 7% fewer traces executed, 4% more traces created, and 4% more uops executed).