Skip to content
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-118335: Make REGEN_JIT_COMMAND empty if tier2 interpreter enabled #118493

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ Change how to use the tier 2 interpreter. Instead of running Python with
``-X uops`` or setting the environment variable ``PYTHON_UOPS=1``, this
choice is now made at build time by configuring with
``--enable-experimental-jit=interpreter``.

**Beware!** This changes the environment variable to enable or disable
micro-ops to ``PYTHON_JIT``. The old ``PYTHON_UOPS`` is no longer used.
24 changes: 15 additions & 9 deletions configure

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

22 changes: 13 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1776,18 +1776,22 @@ AC_ARG_ENABLE([experimental-jit],
[],
[enable_experimental_jit=no])
case $enable_experimental_jit in
no) enable_experimental_jit=no ;;
yes) enable_experimental_jit="-D_Py_JIT -D_Py_TIER2=1" ;;
yes-off) enable_experimental_jit="-D_Py_JIT -D_Py_TIER2=3" ;;
interpreter) enable_experimental_jit="-D_Py_TIER2=4" ;;
interpreter-off) enable_experimental_jit="-D_Py_TIER2=6" ;; # Secret option
no) jit_flags=""; tier2_flags="" ;;
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" ;;
interpreter) jit_flags=""; tier2_flags="-D_Py_TIER2=4" ;;
interpreter-off) jit_flags=""; tier2_flags="-D_Py_TIER2=6" ;; # Secret option
*) AC_MSG_ERROR(
[invalid argument: --enable-experimental-jit=$enable_experimental_jit; expected no|yes|yes-off|interpreter]) ;;
esac
AS_VAR_IF([enable_experimental_jit],
[no],
AS_VAR_IF([tier2_flags],
[],
[AS_VAR_APPEND([CFLAGS_NODIST], [" $enable_experimental_jit"])
[],
[AS_VAR_APPEND([CFLAGS_NODIST], [" $tier2_flags"])])
AS_VAR_IF([jit_flags],
[],
[],
[AS_VAR_APPEND([CFLAGS_NODIST], [" $jit_flags"])
erlend-aasland marked this conversation as resolved.
Show resolved Hide resolved
AS_VAR_SET([REGEN_JIT_COMMAND],
["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"])
AS_VAR_SET([JIT_STENCILS_H], ["jit_stencils.h"])
Expand All @@ -1797,7 +1801,7 @@ AS_VAR_IF([enable_experimental_jit],
[])])
AC_SUBST([REGEN_JIT_COMMAND])
AC_SUBST([JIT_STENCILS_H])
AC_MSG_RESULT([$enable_experimental_jit])
AC_MSG_RESULT([$tier2_flags $jit_flags])

# Enable optimization flags
AC_SUBST([DEF_MAKE_ALL_RULE])
Expand Down
Loading