10000 gh-131798: JIT: Split `CALL_ISINSTANCE` into several uops by tomasr8 · Pull Request #133339 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-131798: JIT: Split CALL_ISINSTANCE into several uops #133339

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

Merged
merged 9 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into jit-split-isinstance
  • Loading branch information
tomasr8 committed May 8, 2025
commit ec61bc5b0b7c5530f390f1a3a16f8174319f3d21
251 changes: 125 additions & 126 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Python/optimizer_bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,14 @@ dummy_func(void) {
res = sym_new_type(ctx, &PyLong_Type);
}

op(_GUARD_CALLABLE_LEN, (callable, unused, unused -- callable, unused, unused)) {
PyObject *len = _PyInterpreterState_GET()->callable_cache.len;
if (sym_get_const(ctx, callable) == len) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
sym_set_const(callable, len);
}

op(_GUARD_CALLABLE_ISINSTANCE, (callable, unused, unused, unused -- callable, unused, unused, unused)) {
PyObject *isinstance = _PyInterpreterState_GET()->callable_cache.isinstance;
if (sym_get_const(ctx, callable) == isinstance) {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0