8000 GH-113710: Tier 2 optimizer: check the function instead of checking g… · diegorusso/cpython@05a9af1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 05a9af1

Browse files
markshannondiegorusso
authored andcommitted
pythonGH-113710: Tier 2 optimizer: check the function instead of checking globals. (pythonGH-116410)
1 parent 957449d commit 05a9af1

File tree

6 files changed

+137
-149
lines changed

6 files changed

+137
-149
lines changed

Include/internal/pycore_uop_ids.h

Lines changed: 108 additions & 109 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
@@ -4058,12 +4058,8 @@ dummy_func(
40584058
null = NULL;
40594059
}
40604060

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

40694065
/* 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)
0