Skip to content

Commit 2c0053c

Browse files
committed
Tier 2 optimizer: check the function instead of checking both the globals and builtins separately
1 parent cbf3d38 commit 2c0053c

6 files changed

Lines changed: 125 additions & 145 deletions

File tree

Include/internal/pycore_uop_ids.h

Lines changed: 107 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_uop_metadata.h

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4057,12 +4057,8 @@ dummy_func(
40574057
null = NULL;
40584058
}
40594059

4060-
tier2 op(_CHECK_GLOBALS, (dict/4 -- )) {
4061-
DEOPT_IF(GLOBALS() != dict);
4062-
}
4063-
4064-
tier2 op(_CHECK_BUILTINS, (dict/4 -- )) {
4065-
DEOPT_IF(BUILTINS() != dict);
4060+
tier2 op(_CHECK_FUNCTION, (func/4 -- )) {
4061+
DEOPT_IF(frame->f_funcobj != func);
40664062
}
40674063

40684064
/* Internal -- for testing executors */

Python/executor_cases.c.h

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)