-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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-115859: Re-enable T2 optimizer pass by default #116062
Conversation
Once tests pass I will try to remember to run the leaks buildbot. |
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.
Just a comment on refcounts, everything else looks good to me.
Python/optimizer_bytecodes.c
Outdated
@@ -118,14 +121,17 @@ dummy_func(void) { | |||
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp)); |
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.
Don't you need to decref it here too on this error branch? Or am I remembering the ownership wrongly? Same for everything below.
Might be better to write it as:
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
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.
Good catch!
There seems to be wrong with
|
🤖 New build scheduled with the buildbot fleet by @gvanrossum for commit bbe8cd9 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Argh, test_type_inconsistency fails when run multiple times. Fix coming up. EDIT: In a separate PR (#116079). |
|
|
…6079) This should fix the refleaks bots. (See #116062 (comment) .)
This undoes the *temporary* default disabling of the T2 optimizer pass in pythongh-115860. - Add a new test that reproduces Brandt's example from pythongh-115859; it indeed crashes before pythongh-116028 with PYTHONUOPSOPTIMIZE=1 - Re-enable the optimizer pass in T2, stop checking PYTHONUOPSOPTIMIZE - Rename the env var to disable T2 entirely to PYTHON_UOPS_OPTIMIZE (must be explicitly set to 0 to disable) - Fix skipIf conditions on tests in test_opt.py accordingly - Export sym_is_bottom() (for debugging) - Fix various things in the `_BINARY_OP_` specializations in the abstract interpreter: - DECREF(temp) - out-of-space check after sym_new_const() - add sym_matches_type() checks, so even if we somehow reach a binary op with symbolic constants of the wrong type on the stack we won't trigger the type assert
python#116079) This should fix the refleaks bots. (See python#116062 (comment) .)
This undoes the *temporary* default disabling of the T2 optimizer pass in pythongh-115860. - Add a new test that reproduces Brandt's example from pythongh-115859; it indeed crashes before pythongh-116028 with PYTHONUOPSOPTIMIZE=1 - Re-enable the optimizer pass in T2, stop checking PYTHONUOPSOPTIMIZE - Rename the env var to disable T2 entirely to PYTHON_UOPS_OPTIMIZE (must be explicitly set to 0 to disable) - Fix skipIf conditions on tests in test_opt.py accordingly - Export sym_is_bottom() (for debugging) - Fix various things in the `_BINARY_OP_` specializations in the abstract interpreter: - DECREF(temp) - out-of-space check after sym_new_const() - add sym_matches_type() checks, so even if we somehow reach a binary op with symbolic constants of the wrong type on the stack we won't trigger the type assert
python#116079) This should fix the refleaks bots. (See python#116062 (comment) .)
This undoes the *temporary* default disabling of the T2 optimizer pass in pythongh-115860. - Add a new test that reproduces Brandt's example from pythongh-115859; it indeed crashes before pythongh-116028 with PYTHONUOPSOPTIMIZE=1 - Re-enable the optimizer pass in T2, stop checking PYTHONUOPSOPTIMIZE - Rename the env var to disable T2 entirely to PYTHON_UOPS_OPTIMIZE (must be explicitly set to 0 to disable) - Fix skipIf conditions on tests in test_opt.py accordingly - Export sym_is_bottom() (for debugging) - Fix various things in the `_BINARY_OP_` specializations in the abstract interpreter: - DECREF(temp) - out-of-space check after sym_new_const() - add sym_matches_type() checks, so even if we somehow reach a binary op with symbolic constants of the wrong type on the stack we won't trigger the type assert
python#116079) This should fix the refleaks bots. (See python#116062 (comment) .)
This undoes the temporary default disabling of the T2 optimizer pass in gh-115860.
_BINARY_OP_
specializations in the abstract interpreter:@Fidget-Spinner Please review when you get up. :-)
Fixes gh-115859.