| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Uses three registers to cache values at the top of the evaluation stack
This significantly reduces memory traffic for smaller, more common uops.
|
| | |
|
| |
|
|
|
|
| |
* Factor out bodies of the largest uops, to reduce jit code size.
* Factor out common assert, also reducing jit code size.
* Limit size of jitted code for a single executor to 1MB.
|
| |
|
|
| |
* Make casts explicit in the instruction definitions
|
| | |
|
| | |
|
| |
|
|
| |
(GH-132506)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Rename 'defined' attribute to 'in_local' to more accurately reflect how it is used
* Make death of variables explicit even for array variables.
* Convert in_memory from boolean to stack offset
* Don't apply liveness analyis to optimizer generated code
* Add 'out' parameter to stack.pop
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Rename 'defined' attribute to 'in_local' to more accurately reflect how it is used
* Make death of variables explicit even for array variables.
* Convert in_memory from boolean to stack offset
* Don't apply liveness analysis to optimizer generated code
* Fix RETURN_VALUE in optimizer
|
| | |
|
| |
|
| |
* Adds some missing #includes
|
| |
|
|
| |
(GH-131493)
|
| | |
|
| |
|
|
|
|
|
|
| |
* Handle escapes in DECREF_INPUTS
* Mark a few more functions as escaping
* Replace DECREF_INPUTS with PyStackRef_CLOSE where possible
|
| |
|
|
| |
(GH-129618)
|
| |
|
|
|
|
|
| |
the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build.
This reverts commit ab61d3f4303d14a413bc9ae6557c730ffdf7579e.
|
| |
|
|
| |
generators (GH-128918)
|
| |
|
| |
Refactor code generators a bit to avoid passing stack property around all over the place
|
| |
|
|
|
|
|
| |
free-threaded builds (#128164)
Finish specialization for LOAD_ATTR in the free-threaded build by adding support for class and instance receivers.
|
| |
|
|
|
|
|
|
|
| |
builds (#127711)
We use the same approach that was used for specialization of LOAD_GLOBAL in free-threaded builds:
_CHECK_ATTR_MODULE is renamed to _CHECK_ATTR_MODULE_PUSH_KEYS; it pushes the keys object for the following _LOAD_ATTR_MODULE_FROM_KEYS (nee _LOAD_ATTR_MODULE). This arrangement avoids having to recheck the keys version.
_LOAD_ATTR_MODULE is renamed to _LOAD_ATTR_MODULE_FROM_KEYS; it loads the value from the keys object pushed by the preceding _CHECK_ATTR_MODULE_PUSH_KEYS at the cached index.
|
| |
|
|
| |
(#126894)
|
| |
|
|
|
|
|
| |
* Spill the evaluation around escaping calls in the generated interpreter and JIT.
* The code generator tracks live, cached values so they can be saved to memory when needed.
* Spills the stack pointer around escaping calls, so that the exact stack is visible to the cycle GC.
|
| |
|
|
| |
that it is kept in memory for calls (GH-124003)
|
| | |
|
| |
|
|
|
|
|
| |
This automatically spills the results from `_PyStackRef_FromPyObjectNew`
to the in-memory stack so that the deferred references are visible to
the GC before we make any possibly escaping call.
Co-authored-by: Ken Jin <kenjin@python.org>
|
| |
|
|
| |
(GH-122286)
|
| |
|
|
| |
handling (GH-122158)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`unused`, but is used and thus cached in a prior uop. (#121788)
* Reject uop definitions that declare values as 'unused' that are already cached by prior uops
* Track which variables are defined and only load from memory when needed
* Support explicit `flush` in macro definitions.
* Make sure stack is flushed in where needed.
|
| |
|
|
| |
generator (GH-121496)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
---------
Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com>
Co-authored-by: Jules <57632293+JuliaPoo@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com>
|
| |
|
|
| |
not themselves. (GH-114078)
|
| |
|
|
| |
Co-authored-by: Jules <57632293+JuliaPoo@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
interpreter code generator (GH-112968)
|
|
|
generator (GH-112299)
|