8000 gh-115859: Re-enable T2 optimizer pass by default by gvanrossum · Pull Request #116062 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115859: Re-enable T2 optimizer pass by default #116062

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
Feb 28, 2024
Prev Previous commit
Arrange things so DECREF(temp) happens even if sym_new_const() runs o…
…ut of space
  • Loading branch information
gvanrossum committed Feb 28, 2024
commit bbe8cd9841269a23aec3b9a88bd9f152824c1137
30 changes: 18 additions & 12 deletions Python/optimizer_bytecodes.c
8000
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ dummy_func(void) {
if (temp == NULL) {
goto error;
}
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp));
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
// TODO gh-115506:
// replace opcode with constant propagated one and add tests!
Py_DECREF(temp);
}
else {
OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyLong_Type));
Expand All @@ -139,10 +140,11 @@ dummy_func(void) {
if (temp == NULL) {
goto error;
}
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp));
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
// TODO gh-115506:
// replace opcode with constant propagated one and add tests!
Py_DECREF(temp);
}
else {
OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyLong_Type));
Expand All @@ -160,10 +162,11 @@ dummy_func(void) {
if (temp == NULL) {
goto error;
}
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp));
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
// TODO gh-115506:
// replace opcode with constant propagated one and add tests!
Py_DECREF(temp);
}
else {
OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyLong_Type));
Expand All @@ -182,10 +185,11 @@ dummy_func(void) {
if (temp == NULL) {
goto error;
}
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp));
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
// TODO gh-115506:
// replace opcode with constant propagated one and update tests!
Py_DECREF(temp);
}
else {
OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyFloat_Type));
Expand All @@ -204,10 +208,11 @@ dummy_func(void) {
if (temp == NULL) {
goto error;
}
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp));
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
// TODO gh-115506:
// replace opcode with constant propagated one and update tests!
Py_DECREF(temp);
}
else {
OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyFloat_Type));
Expand All @@ -226,10 +231,11 @@ dummy_func(void) {
if (temp == NULL) {
goto error;
}
OUT_OF_SPACE_IF_NULL(res = sym_new_const(ctx, temp));
res = sym_new_const(ctx, temp);
Py_DECREF(temp);
OUT_OF_SPACE_IF_NULL(res);
// TODO gh-115506:
// replace opcode with constant propagated one and update tests!
Py_DECREF(temp);
}
else {
OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyFloat_Type));
Expand Down
30 changes: 18 additions & 12 deletions Python/optimizer_cases.c.h

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

0