summaryrefslogtreecommitdiffstats
path: root/Python/optimizer_cases.c.h
Commit message (Collapse)AuthorAgeFilesLines
* [3.14] gh-135608: Add a null check for attribute promotion to fix a JIT ↵Ken Jin2025-06-201-1/+6
| | | | | | | crash (GH-135613) (#135739) gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613) Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
* Revert "gh-133395: add option for extension modules to specialize ↵Irit Katriel2025-05-061-1/+3
| | | | BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498)
* GH-131798: Split CALL_LEN into several uops (GH-133180)Diego Russo2025-05-051-2/+13
|
* gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, ↵Irit Katriel2025-05-051-3/+1
| | | | apply to arrays (#133396)
* gh-132744: Check recursion limit in CALL_PY_GENERAL (GH-132746)Ken Jin2025-05-021-0/+4
|
* gh-100239: specialize BINARY_OP/SUBSCR for list-slice (#132626)Irit Katriel2025-05-011-0/+13
|
* gh-132661: Implement PEP 750 (#132662)Lysandros Nikolaou2025-04-301-0/+18
| | | | | | | | | | | | | 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>
* gh-131798: JIT - Use `sym_new_type` instead of `sym_new_not_null` for ↵Nadeshiko Manju2025-04-271-2/+2
| | | | | | _BUILD_STRING, _BUILD_SET (GH-132564) Signed-off-by: Manjusaka <me@manjusaka.me>
* gh-131798: JIT: Propagate the result in `_BINARY_OP_SUBSCR_TUPLE_INT` ↵Tomas R.2025-04-261-1/+21
| | | | (GH-133003)
* gh-131798: JIT: Narrow the return type of _CALL_LEN to int (#132940)Diego Russo2025-04-251-1/+1
| | | | | | Reduce unnecessary guards whenever `len()` is called and used after. Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
* GH-131798: Split up and optimize CALL_TUPLE_1 in the JIT (GH-132851)Tomas R.2025-04-241-1/+18
|
* GH-131798: Split up and optimize CALL_STR_1 in the JIT (GH-132849)Tomas R.2025-04-241-1/+18
|
* GH-131798: JIT: Split CALL_TYPE_1 into several uops (GH-132419)Tomas R.2025-04-221-1/+28
|
* gh-131586: Avoid refcount contention in context managers (gh-131851)Sam Gross2025-04-211-7/+15
| | | | | This avoid reference count contention in the free threading build when calling special methods like `__enter__` and `__exit__`.
* GH-130415: Improve the JIT's unneeded uop removal pass (GH-132333)Brandt Bucher2025-04-211-0/+1
|
* GH-131498: Replace single-element arrays with scalars in bytecodes.c (GH-132615)Brandt Bucher2025-04-181-16/+17
|
* gh-131798: Use `sym_new_type` instead of `sym_new_not_null` for ↵Nadeshiko Manju2025-04-161-3/+3
| | | | | | | `_BUILD_LIST`, `_BUILD_SLICE`, and `_BUILD_MAP` (GH-132434) --------- Signed-off-by: Manjusaka <me@manjusaka.me>
* GH-131498: Cases generator: Allow input and 'peek' variables to be modified ↵Mark Shannon2025-04-141-6/+0
| | | | (GH-132506)
* GH-131798: Remove JIT guards for dict, frozenset, list, set, and tuple ↵Brandt Bucher2025-04-091-2/+72
| | | | (GH-132289)
* GH-131798: Narrow the result of _CONTAINS_OP_DICT to bool in the JIT (GH-132269)Nadeshiko Manju2025-04-081-3/+3
| | | | Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
* GH-131798: Narrow the result type of _BINARY_OP_SUBSCR_STR_INT to str in the ↵Tomas R.2025-04-081-1/+1
| | | | JIT (GH-132153)
* GH-131798: Narrow the result of _CONTAINS_OP_SET to bool in the JIT (GH-132057)Tomas R.2025-04-051-3/+3
|
* GH-131498: Cases generator: manage stacks automatically (GH-132074)Mark Shannon2025-04-041-9/+0
|
* GH-131498: Cases generator: Parse down to C statement level. (GH-131948)Mark Shannon2025-04-021-111/+42
| | | | | * Parse down to statement level in the cases generator * Add handling for #if macros, treating them much like normal ifs.
* GH-131726: Split up _CHECK_VALIDITY_AND_SET_IP (GH-131810)Brandt Bucher2025-04-011-4/+0
|
* GH-131798: Allow the JIT to remove more int/float/str guards (GH-131800)Brandt Bucher2025-04-011-60/+34
|
* gh-130704: Strength reduce `LOAD_FAST{_LOAD_FAST}` (#130708)mpage2025-04-011-0/+9
| | | Optimize `LOAD_FAST` opcodes into faster versions that load borrowed references onto the operand stack when we can prove that the lifetime of the local outlives the lifetime of the temporary that is loaded onto the stack.
* GH-131798: Remove type checks for _TO_BOOL_STR (GH-131816)Amit Lavon2025-03-301-1/+10
|
* GH-130415: Remove redundant sym_matches_type calls in the JIT optimizer ↵Brandt Bucher2025-03-271-24/+13
| | | | (GH-131778)
* GH-131729: Code-gen better liveness analysis (GH-131732)Mark Shannon2025-03-261-68/+21
| | | | | | | | | | | | * 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
* GH-130415: Optimize constant comparison in JIT builds (GH-131489)Savannah Ostrowski2025-03-211-4/+40
|
* GH-131498: Remove conditional stack effects (GH-131499)Mark Shannon2025-03-201-5/+9
| | | * Adds some missing #includes
* gh-115999: Add free-threaded specialization for FOR_ITER (#128798)T. Wouters2025-03-121-1/+3
| | | | Add free-threaded versions of existing specialization for FOR_ITER (list, tuples, fast range iterators and generators), without significantly affecting their thread-safety. (Iterating over shared lists/tuples/ranges should be fine like before. Reusing iterators between threads is not fine, like before. Sharing generators between threads is a recipe for significant crashes, like before.)
* GH-130903: typo in optimizer DSL for _GUARD_BOTH_UNICODE (#130904)Jamie Phan2025-03-061-1/+1
| | | Typo introduced in gh-118910.
* GH-130415: Narrow str to "" based on boolean tests (GH-130476)Amit Lavon2025-03-041-1/+1
|
* GH-130415: Narrow int to 0 based on boolean tests (GH-130772)Klaus1172025-03-041-1/+1
|
* GH-130415: Use boolean guards to narrow types to values in the JIT (GH-130659)Brandt Bucher2025-03-021-54/+60
|
* GH-130296: Avoid stack transients in four instructions. (GH-130310)Mark Shannon2025-02-281-112/+30
| | | | | | | | | * Combine _GUARD_GLOBALS_VERSION_PUSH_KEYS and _LOAD_GLOBAL_MODULE_FROM_KEYS into _LOAD_GLOBAL_MODULE * Combine _GUARD_BUILTINS_VERSION_PUSH_KEYS and _LOAD_GLOBAL_BUILTINS_FROM_KEYS into _LOAD_GLOBAL_BUILTINS * Combine _CHECK_ATTR_MODULE_PUSH_KEYS and _LOAD_ATTR_MODULE_FROM_KEYS into _LOAD_ATTR_MODULE * Remove stack transient in LOAD_ATTR_WITH_HINT
* GH-128682: Account for escapes in `DECREF_INPUTS` (GH-129953)Mark Shannon2025-02-121-6/+12
| | | | | | | | * Handle escapes in DECREF_INPUTS * Mark a few more functions as escaping * Replace DECREF_INPUTS with PyStackRef_CLOSE where possible
* gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR ↵Irit Katriel2025-02-071-15/+6
| | | | (#129700)
* GH-129715: Remove _DYNAMIC_EXIT (GH-129716)Brandt Bucher2025-02-071-4/+0
|
* GH-129709: Clean up tier two (GH-129710)Brandt Bucher2025-02-071-127/+2
|
* GH-128563: Generate `opcode = ...` in instructions that need `opcode` ↵Mark Shannon2025-02-031-5/+1
| | | | | (GH-129608) * Remove support for GO_TO_INSTRUCTION
* GH-128682: Make `PyStackRef_CLOSE` escaping. (GH-129404)Mark Shannon2025-02-031-32/+14
|
* GH-128914: Remove all but one conditional stack effects (GH-129226)Mark Shannon2025-01-271-90/+31
| | | | | | | | | | | | | * Remove all 'if (0)' and 'if (1)' conditional stack effects * Use array instead of conditional for BUILD_SLICE args * Refactor LOAD_GLOBAL to use a common conditional uop * Remove conditional stack effects from LOAD_ATTR specializations * Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array. * Remove conditional stack effects from CALL_FUNCTION_EX
* Revert "GH-128914: Remove conditional stack effects from `bytecodes.c` and ↵Sam Gross2025-01-231-35/+69
| | | | | | | the code generators (GH-128918)" (GH-129202) The commit introduced a ~2.5-3% regression in the free threading build. This reverts commit ab61d3f4303d14a413bc9ae6557c730ffdf7579e.
* GH-128914: Remove conditional stack effects from `bytecodes.c` and the code ↵Mark Shannon2025-01-201-69/+35
| | | | generators (GH-128918)
* GH-128939: Refactor JIT optimize structs (GH-128940)Mark Shannon2025-01-201-285/+291
|
* GH-126599: Remove the "counter" optimizer/executor (GH-126853)Xuanteng Huang2025-01-161-6/+0
|
* gh-100239: specialize long tail of binary operations (#128722)Irit Katriel2025-01-161-0/+13
|