mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
GH-141794: Limit size of generated machine code. (GH-142228)
* 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.
This commit is contained in:
parent
aea5531583
commit
62423c9c36
14 changed files with 1406 additions and 1731 deletions
|
|
@ -13,6 +13,9 @@ extern "C" {
|
|||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
/* To be able to reason about code layout and branches, keep code size below 1 MB */
|
||||
#define PY_MAX_JIT_CODE_SIZE ((1 << 20)-1)
|
||||
|
||||
#ifdef _Py_JIT
|
||||
|
||||
typedef _Py_CODEUNIT *(*jit_func)(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue