GH-116017: Get rid of _COLD_EXITs (GH-120960)

This commit is contained in:
Brandt Bucher 2024-07-01 13:17:40 -07:00 committed by GitHub
parent 294e724964
commit 33903c53db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 246 additions and 337 deletions

View file

@ -40,8 +40,6 @@ class HoleValue(enum.Enum):
JUMP_TARGET = enum.auto()
# The base address of the machine code for the error jump target (exposed as _JIT_ERROR_TARGET):
ERROR_TARGET = enum.auto()
# The index of the exit to be jumped through (exposed as _JIT_EXIT_INDEX):
EXIT_INDEX = enum.auto()
# A hardcoded value of zero (used for symbol lookups):
ZERO = enum.auto()
@ -107,7 +105,6 @@ _HOLE_EXPRS = {
HoleValue.TARGET: "instruction->target",
HoleValue.JUMP_TARGET: "instruction_starts[instruction->jump_target]",
HoleValue.ERROR_TARGET: "instruction_starts[instruction->error_target]",
HoleValue.EXIT_INDEX: "instruction->exit_index",
HoleValue.ZERO: "",
}

View file

@ -103,7 +103,6 @@ _JIT_ENTRY(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState
uint64_t _operand = ((uint64_t)_operand_hi << 32) | _operand_lo;
#endif
PATCH_VALUE(uint32_t, _target, _JIT_TARGET)
PATCH_VALUE(uint16_t, _exit_index, _JIT_EXIT_INDEX)
OPT_STAT_INC(uops_executed);
UOP_STAT_INC(uopcode, execution_count);
@ -126,11 +125,4 @@ exit_to_tier1:
exit_to_tier1_dynamic:
tstate->previous_executor = (PyObject *)current_executor;
GOTO_TIER_ONE(frame->instr_ptr);
exit_to_trace:
{
_PyExitData *exit = &current_executor->exits[_exit_index];
Py_INCREF(exit->executor);
tstate->previous_executor = (PyObject *)current_executor;
GOTO_TIER_TWO(exit->executor);
}
}