GH-113464: Add a JIT backend for tier 2 (GH-113465)

Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information on how to install the required build-time tooling.
This commit is contained in:
Brandt Bucher 2024-01-28 18:48:48 -08:00 committed by GitHub
parent f7c05d7ad3
commit f6d9e5926b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1738 additions and 5 deletions

31
configure generated vendored
View file

@ -920,6 +920,7 @@ LLVM_AR
PROFILE_TASK
DEF_MAKE_RULE
DEF_MAKE_ALL_RULE
REGEN_JIT_COMMAND
ABIFLAGS
LN
MKDIR_P
@ -1074,6 +1075,7 @@ with_pydebug
with_trace_refs
enable_pystats
with_assertions
enable_experimental_jit
enable_optimizations
with_lto
enable_bolt
@ -1801,6 +1803,9 @@ Optional Features:
--disable-gil enable experimental support for running without the
GIL (default is no)
--enable-pystats enable internal statistics gathering (default is no)
--enable-experimental-jit
build the experimental just-in-time compiler
(default is no)
--enable-optimizations enable expensive, stable optimizations (PGO, etc.)
(default is no)
--enable-bolt enable usage of the llvm-bolt post-link optimizer
@ -7997,6 +8002,32 @@ else
printf "%s\n" "no" >&6; }
fi
# Check for --enable-experimental-jit:
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-experimental-jit" >&5
printf %s "checking for --enable-experimental-jit... " >&6; }
# Check whether --enable-experimental-jit was given.
if test ${enable_experimental_jit+y}
then :
enableval=$enable_experimental_jit;
else $as_nop
enable_experimental_jit=no
fi
if test "x$enable_experimental_jit" = xno
then :
else $as_nop
as_fn_append CFLAGS_NODIST " -D_Py_JIT"
REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"
if test "x$Py_DEBUG" = xtrue
then :
as_fn_append REGEN_JIT_COMMAND " --debug"
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_experimental_jit" >&5
printf "%s\n" "$enable_experimental_jit" >&6; }
# Enable optimization flags