Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-113710: Add a "globals to constants" pass#114592

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markshannon merged 16 commits intopython:mainfromfaster-cpython:globals-to-constants
Feb 2, 2024
Merged
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
3941620
Change optimizer API to provide more information
markshannonJan 18, 2024
665cc58
Add new uops for optimizing globals
markshannonJan 18, 2024
9d9bc24
Optimize LOAD_GLOBAL specializations in tier 2
markshannonJan 18, 2024
24b3533
Fix handling of call stack in trace generator
markshannonJan 18, 2024
35a92cc
Get globals to const pass working
markshannonJan 18, 2024
8c699a3
Minor tidying
markshannonJan 18, 2024
28dbecd
Merge branch 'main' into globals-to-constants
markshannonJan 18, 2024
99e38ca
Merge builtin watchers and limit re-optimizations
markshannonJan 19, 2024
e0eaea9
Add braces
markshannonJan 19, 2024
d3a2590
Use a few bits in the dict version tag to track deoptimizations
markshannonJan 19, 2024
b3f2418
Address review comments
markshannonFeb 1, 2024
0798207
Merge branch 'main' into globals-to-constants
markshannonFeb 1, 2024
e65dcf2
Tolerate default optimizer being called
markshannonFeb 2, 2024
f763e37
Fix compiler warning
markshannonFeb 2, 2024
5bdac7a
Reduce modification limits a bit.
markshannonFeb 2, 2024
3dc8907
Merge branch 'main' into globals-to-constants
markshannonFeb 2, 2024
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
PrevPrevious commit
NextNext commit
Tolerate default optimizer being called
  • Loading branch information
@markshannon
markshannon committedFeb 2, 2024
commite65dcf21f8987320ab6b9b13f0d4f68cac6b0c4e
8 changes: 3 additions & 5 deletionsPython/optimizer.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -108,16 +108,14 @@ PyUnstable_Replace_Executor(PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutor
}

static int
error_optimize(
never_optimize(
_PyOptimizerObject* self,
_PyInterpreterFrame *frame,
_Py_CODEUNIT *instr,
_PyExecutorObject **exec,
int Py_UNUSED(stack_entries))
{
assert(0);
PyErr_Format(PyExc_SystemError, "Should never call error_optimize");
return -1;
return 0;
}

PyTypeObject _PyDefaultOptimizer_Type = {
Expand All@@ -130,7 +128,7 @@ PyTypeObject _PyDefaultOptimizer_Type = {

_PyOptimizerObject _PyOptimizer_Default = {
PyObject_HEAD_INIT(&_PyDefaultOptimizer_Type)
.optimize =error_optimize,
.optimize =never_optimize,
.resume_threshold = INT16_MAX,
.backedge_threshold = INT16_MAX,
};
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp