summaryrefslogtreecommitdiffstats
path: root/Python/optimizer.c
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-106290: Fix edge cases around uops (#106319)Guido van Rossum2023-07-031-60/+72
| | | | | | | | | | - Tweak uops debugging output - Fix the bug from gh-106290 - Rename `SET_IP` to `SAVE_IP` (per https://github.com/faster-cpython/ideas/issues/558) - Add a `SAVE_IP` uop at the start of the trace (ditto) - Allow `unbound_local_error`; this gives us uops for `LOAD_FAST_CHECK`, `LOAD_CLOSURE`, and `DELETE_FAST` - Longer traces - Support `STORE_FAST_LOAD_FAST`, `STORE_FAST_STORE_FAST` - Add deps on pycore_uops.h to Makefile(.pre.in)
* gh-106320: Use _PyInterpreterState_GET() (#106336)Victor Stinner2023-07-021-5/+4
| | | | Replace PyInterpreterState_Get() with inlined _PyInterpreterState_GET().
* gh-104584: Emit macro expansions to opcode_metadata.h (#106163)Guido van Rossum2023-06-281-3/+5
| | | | | | | This produces longer traces (superblocks?). Also improved debug output (uop names are now printed instead of numeric opcodes). This would be simpler if the numeric opcode values were generated by generate_cases.py, but that's another project. Refactored some code in generate_cases.py so the essential algorithm for cache effects is only run once. (Deciding which effects are used and what the total cache size is, regardless of what's used.)
* gh-104584: Baby steps towards generating and executing traces (#105924)Guido van Rossum2023-06-271-0/+199
| | | | | Added a new, experimental, tracing optimizer and interpreter (a.k.a. "tier 2"). This currently pessimizes, so don't use yet -- this is infrastructure so we can experiment with optimizing passes. To enable it, pass ``-Xuops`` or set ``PYTHONUOPS=1``. To get debug output, set ``PYTHONUOPSDEBUG=N`` where ``N`` is a debug level (0-4, where 0 is no debug output and 4 is excessively verbose). All of this code is likely to change dramatically before the 3.13 feature freeze. But this is a first step.
* GH-104584: Assorted fixes for the optimizer API. (GH-105683)Mark Shannon2023-06-191-28/+45
| | | | | | * Add test for long loops * Clear ENTER_EXECUTOR when deopting code objects.
* GH-100987: Allow objects other than code objects as the "executable" of an ↵Mark Shannon2023-06-141-3/+5
| | | | | | | | | | internal frame. (GH-105727) * Add table describing possible executable classes for out-of-process debuggers. * Remove shim code object creation code as it is no longer needed. * Make lltrace a bit more robust w.r.t. non-standard frames.
* GH-104584: Allow optimizers to opt out of optimizing. (GH-105244)Mark Shannon2023-06-051-11/+18
|
* GH-104584: Plugin optimizer API (GH-105100)Mark Shannon2023-06-021-0/+254