mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
GH-104584: Miscellaneous fixes for -Xuops (GH-106908)
This commit is contained in:
parent
009e8f084c
commit
214a25dd81
10 changed files with 67 additions and 18 deletions
|
@ -2182,7 +2182,14 @@ dummy_func(
|
|||
JUMPBY(1-oparg);
|
||||
#if ENABLE_SPECIALIZATION
|
||||
here[1].cache += (1 << OPTIMIZER_BITS_IN_COUNTER);
|
||||
if (here[1].cache > tstate->interp->optimizer_backedge_threshold) {
|
||||
if (here[1].cache > tstate->interp->optimizer_backedge_threshold &&
|
||||
// Double-check that the opcode isn't instrumented or something:
|
||||
here->op.code == JUMP_BACKWARD &&
|
||||
// _PyOptimizer_BackEdge is going to change frame->prev_instr,
|
||||
// which breaks line event calculations:
|
||||
next_instr->op.code != INSTRUMENTED_LINE
|
||||
)
|
||||
{
|
||||
OBJECT_STAT_INC(optimization_attempts);
|
||||
frame = _PyOptimizer_BackEdge(frame, here, next_instr, stack_pointer);
|
||||
if (frame == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue