Commit Graph

73 Commits

Author SHA1 Message Date
Brandt Bucher 7ad90463df
GH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134349) 2025-05-20 12:32:26 -04:00
Brandt Bucher 57c9810ba4
GH-113464: Add the JIT to What's New (GH-133486) 2025-05-05 20:06:41 -07:00
Mark Shannon ac7d5ba96e
GH-133231: Changes to executor management to support proposed `sys._jit` module (GH-133287)
* Track the current executor, not the previous one, on the thread-state. 

* Batch executors for deallocation to avoid having to constantly incref executors; this is an ad-hoc form of deferred reference counting.
2025-05-04 10:05:35 +01:00
Brandt Bucher bfcbb28223
GH-113464: Get LLVM from cpython-bin-deps on Windows (GH-133278) 2025-05-02 11:17:15 -07:00
Savannah Ostrowski 26c0248b54
GH-114809: Add support for macOS multi-arch builds with the JIT enabled (#131751)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2025-04-30 11:03:57 -07:00
Lysandros Nikolaou 60202609a2
gh-132661: Implement PEP 750 (#132662)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Wingy <git@wingysam.xyz>
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Dave Peck <davepeck@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Paul Everitt <pauleveritt@me.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 11:46:41 +02:00
Mark Shannon ccf1b0b1c1
GH-132508: Use tagged integers on the evaluation stack for the last instruction offset (GH-132545) 2025-04-29 18:00:35 +01:00
sobolevn 87b1ea016b
Update `pre-commit` repos (#132792) 2025-04-22 18:32:19 +03:00
Bojun Ren a26a301f8b
GH-130673: Gracefully handle missing sections in JIT build (GH-130906) 2025-03-25 16:35:39 -07:00
Diego Russo ea0453ee97
GH-130887: Always remove trailing jumps in AArch64 JIT stencils (GH-131042) 2025-03-25 10:15:36 -07:00
Victor Stinner 49fb75c676
gh-131238: Add missing pycore_function.h includes for JIT compiler (#131571) 2025-03-21 23:37:49 +00:00
Mark Shannon 7ebd71ee14
GH-131498: Remove conditional stack effects (GH-131499)
* Adds some missing #includes
2025-03-20 15:39:38 +00:00
Diego Russo 02de9cb9a8
gh-129964: Fix JIT crash on Windows on Arm (GH-130882) 2025-03-05 12:40:50 -08:00
Brandt Bucher 5d8db36bbb
GH-115802: JIT using the "medium" code model on x86_64-unknown-linux-gnu (GH-130097) 2025-03-05 11:54:33 -08:00
sobolevn 422f8e9e02
gh-129805: Fix `bytes` annotation in `Tools/jit` (#129806) 2025-02-17 10:55:30 +03:00
Brandt Bucher 05e89c34bd
GH-115869: Don't JIT zeroed bytes (GH-130023) 2025-02-13 10:51:03 -08:00
Brandt Bucher 70e387c990
GH-129709: Clean up tier two (GH-129710) 2025-02-07 09:52:49 -08:00
Brandt Bucher fbaa6c8ff0
GH-129763: Remove the LLTRACE macro (GH-129764) 2025-02-07 08:49:51 -08:00
Ken Jin cb640b659e
gh-128563: A new tail-calling interpreter (GH-128718)
Co-authored-by: Garrett Gu <garrettgu777@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-06 23:21:57 +08:00
Stan Ulbrych 652f66ac38
gh-129438: Update ``--enable-experimental-jit`` section with install requirements (#129450)
Add a note to the `JIT` docs that building CPython with `JIT` requires Python 3.11 or newer.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2025-01-30 12:16:05 +02:00
Diego Russo 7c5a6f67c7
Enable native AArch64 Ubuntu CI jobs (#127584)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2024-12-04 14:12:06 -08:00
Brandt Bucher 17c16aea66
GH-115869: Make jit_stencils.h reproducible (GH-127166) 2024-11-24 14:42:50 -08:00
Ken Jin 6293d00e72
gh-120619: Strength reduce function guards, support 2-operand uop forms (GH-124846)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2024-11-09 11:35:33 +08:00
Savannah Ostrowski c3a12ae13e
GH-125911: Rename big trampoline to "shim" (GH-126339) 2024-11-05 15:26:46 -08:00
Peter Bierma 1371295e67
gh-126366: Fix crash if `__iter__` raises an exception during `yield from` (#126369) 2024-11-05 15:26:36 +05:30
Savannah Ostrowski c29bbe2101
GH-125498: Update JIT builds to use LLVM 19 and preserve_none (GH-125499) 2024-10-30 12:03:31 -07:00
Michael Droettboom c8fd4b12e3
gh-125207: Fix MSVC 1935 build with JIT (#125209)
* gh-125207: Use {0} array initializers

* Simplify, as suggested in PR

* Revert change to explicitly specify length
2024-10-18 15:51:29 -04:00
Diego Russo b85923a0fe
GH-119726: Deduplicate AArch64 trampolines within a trace (GH-123872) 2024-10-02 12:07:20 -07:00
Savannah Ostrowski 6737333ac5
GH-124820: Move `-mno-outline-atomics` flag to aarch64 Linux JIT builds only (#124821) 2024-10-02 11:40:59 +02:00
Savannah Ostrowski 65f1237098
GH-123516: Improve JIT memory consumption by invalidating cold executors (GH-124443)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-27 00:35:42 +00:00
Savannah Ostrowski b6471f4a39
GH-124408: Temporarily skip test_strftime_y2k for emulated Linux JIT CI (GH-124466) 2024-09-24 18:09:50 -07:00
Brandt Bucher 51185923a8
GH-113464: Speed up JIT builds (GH-122839) 2024-08-14 07:53:46 -07:00
Bénédikt Tran 7b8328b6b3
GH-121723: Skip test_config_queue_handler_multiprocessing_context in emulated JIT CI (#122969) 2024-08-13 16:25:36 -07:00
Miro Hrončok 44659d3927
GH-118943: Handle races when moving jit_stencils.h (GH-120690)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-08-05 16:10:40 -07:00
Savannah Ostrowski f113c1a2a9
Add note about PYTHON_JIT environment variable to JIT README (GH-121635) 2024-07-17 15:17:47 -07:00
Diego Russo 84512c0e7f
GH-119726: Emit AArch64 trampolines out-of-line (GH-121280) 2024-07-03 06:22:21 -07:00
Diego Russo 966260841b
GH-119726: Use LDR for AArch64 trampolines (GH-121001) 2024-07-01 15:52:33 -07:00
Brandt Bucher 33903c53db
GH-116017: Get rid of _COLD_EXITs (GH-120960) 2024-07-01 13:17:40 -07:00
Ken Jin 22b0de2755
gh-117139: Convert the evaluation stack to stack refs (#118450)
This PR sets up tagged pointers for CPython.

The general idea is to create a separate struct _PyStackRef for everything on the evaluation stack to store the bits. This forces the C compiler to warn us if we try to cast things or pull things out of the struct directly.

Only for free threading: We tag the low bit if something is deferred - that means we skip incref and decref operations on it. This behavior may change in the future if Mark's plans to defer all objects in the interpreter loop pans out.

This implies a strict stack reference discipline is required. ALL incref and decref operations on stackrefs must use the stackref variants. It is unsafe to untag something then do normal incref/decref ops on it.

The new incref and decref variants are called dup and close. They mimic a "handle" API operating on these stackrefs.

Please read Include/internal/pycore_stackref.h for more information!

---------

Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com>
2024-06-27 03:10:43 +08:00
Mark Shannon 8f5a01707f
GH-120982: Add stack check assertions to generated interpreter code (GH-120992) 2024-06-25 16:42:29 +01:00
Brandt Bucher a47abdb45d
GH-117062: Make _JUMP_TO_TOP a general absolute jump (GH-120854) 2024-06-24 08:35:10 -07:00
Xarblu 285f42c850
GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120604) 2024-06-19 17:48:00 -07:00
Diego Russo a0dce37895
GH-119726: Deduplicate JIT trampolines for out-of-range jumps (GH-120250) 2024-06-18 18:27:02 -07:00
Diego Russo 07daaf1ce1
Ignore some failing tests in emulated JIT CI (GH-120375) 2024-06-18 18:24:29 -07:00
Kirill Podoprigora 95737bbf18
gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative option (#120434) 2024-06-17 15:52:07 +00:00
Brandt Bucher 4702b7b5bd
GH-118943: Fix a race condition when generating jit_stencils.h (GH-118957) 2024-05-16 12:11:42 -04:00
Miro Hrončok ab73bcdf73
Explain how to install LLVM on Fedora (GH-118983)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-05-16 12:09:52 -04:00
Michał Górny e04cd964eb
GH-118836: Fix JIT build error when SHT_NOTE section is present (GH-119000) 2024-05-13 14:37:02 -07:00
Brandt Bucher 1b7e5e6e60
GH-113464: Generate a more efficient JIT (GH-118512) 2024-05-03 16:41:07 -07:00
Savannah Ostrowski 5248596781
GH-118251: Skip fewer test in emulated JIT CI (GH-118536) 2024-05-03 19:07:10 +00:00