diff options
author | Ken Jin <kenjin@python.org> | 2024-02-23 18:43:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 18:43:52 (GMT) |
commit | 3d8fc06d4f8dc1e7be2455a7e89b37285fa89112 (patch) | |
tree | f57ffd1f4c995f64d8b9eaefd831fa087c17fe2a /Python | |
parent | e4561e050148f6dc347e8c7ba30c8125b5fc0e45 (diff) | |
download | cpython-3d8fc06d4f8dc1e7be2455a7e89b37285fa89112.zip cpython-3d8fc06d4f8dc1e7be2455a7e89b37285fa89112.tar.gz cpython-3d8fc06d4f8dc1e7be2455a7e89b37285fa89112.tar.bz2 |
gh-115859: Disable the tier 2 redundancy eliminator by default (GH-115860)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/optimizer_analysis.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index 9503dcc..47bfc8c 100644 --- a/Python/optimizer_analysis.c +++ b/Python/optimizer_analysis.c @@ -810,9 +810,12 @@ _Py_uop_analyze_and_optimize( peephole_opt(frame, buffer, buffer_size); - err = uop_redundancy_eliminator( - (PyCodeObject *)frame->f_executable, buffer, - buffer_size, curr_stacklen, dependencies); + char *uop_optimize = Py_GETENV("PYTHONUOPSOPTIMIZE"); + if (uop_optimize != NULL && *uop_optimize > '0') { + err = uop_redundancy_eliminator( + (PyCodeObject *)frame->f_executable, buffer, + buffer_size, curr_stacklen, dependencies); + } if (err == 0) { goto not_ready; |