Skip to content

Commit

Permalink
Actually, make the default yes-off
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher committed Sep 22, 2024
1 parent edc643a commit a6f1035
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
3 changes: 2 additions & 1 deletion PCbuild/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ set verbose=/nologo /v:m /clp:summary
set kill=
set do_pgo=
set pgo_job=-m test --pgo
set UseTIER2=
set UseTIER2=3
set UseJIT=true

:CheckOpts
if "%~1"=="-h" goto Usage
Expand Down
20 changes: 10 additions & 10 deletions Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,16 +1299,16 @@ init_interp_main(PyThreadState *tstate)
// PYTHON_JIT=0|1 overrides the default
enabled = *env != '0';
}
// if (enabled) {
// PyObject *opt = _PyOptimizer_NewUOpOptimizer();
// if (opt == NULL) {
// return _PyStatus_ERR("can't initialize optimizer");
// }
// if (_Py_SetTier2Optimizer((_PyOptimizerObject *)opt)) {
// return _PyStatus_ERR("can't install optimizer");
// }
// Py_DECREF(opt);
// }
if (enabled) {
PyObject *opt = _PyOptimizer_NewUOpOptimizer();
if (opt == NULL) {
return _PyStatus_ERR("can't initialize optimizer");
}
if (_Py_SetTier2Optimizer((_PyOptimizerObject *)opt)) {
return _PyStatus_ERR("can't install optimizer");
}
Py_DECREF(opt);
}
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions configure

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

4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1822,9 +1822,9 @@ AC_ARG_ENABLE([experimental-jit],
[],
[enable_experimental_jit=no])
case $enable_experimental_jit in
no) jit_flags=""; tier2_flags="" ;;
yes-off) jit_flags=""; tier2_flags="" ;; # XXX
yes) jit_flags="-D_Py_JIT"; tier2_flags="-D_Py_TIER2=1" ;;
yes-off) jit_flags="-D_Py_JIT"; tier2_flags="-D_Py_TIER2=3" ;;
no) jit_flags="-D_Py_JIT"; tier2_flags="-D_Py_TIER2=3" ;; # XXX
interpreter) jit_flags=""; tier2_flags="-D_Py_TIER2=4" ;;
interpreter-off) jit_flags=""; tier2_flags="-D_Py_TIER2=6" ;; # Secret option
*) AC_MSG_ERROR(
Expand Down

0 comments on commit a6f1035

Please sign in to comment.