From 9b1b295e9cd4c3867e49a42e60c1c5653ab877c8 Mon Sep 17 00:00:00 2001 From: LloydZ <35182391+cocolato@users.noreply.github.com> Date: Mon, 9 Feb 2026 03:42:54 +0000 Subject: [PATCH 1/3] fix missing out uops --- Python/optimizer_analysis.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index 381b2500158ef0..7bd6970e5fd2dc 100644 --- a/Python/optimizer_analysis.c +++ b/Python/optimizer_analysis.c @@ -83,7 +83,7 @@ dump_abstract_stack(_Py_UOpsAbstractFrame *frame, JitOptRef *stack_pointer) static void dump_uop(JitOptContext *ctx, const char *label, int index, - const _PyUOpInstruction *instr, JitOptRef *stack_pointer) + const _PyUOpInstruction *instr, JitOptRef *stack_pointer) { if (get_lltrace() >= 3) { printf("%4d %s: ", index, label); @@ -95,11 +95,24 @@ dump_uop(JitOptContext *ctx, const char *label, int index, } } +static void +dump_uops(JitOptContext *ctx, const char *label, + _PyUOpInstruction *start, JitOptRef *stack_pointer) +{ + int current_len = uop_buffer_length(&ctx->out_buffer); + int added_count = (int)(ctx->out_buffer.next - start); + for (int j = 0; j < added_count; j++) { + dump_uop(ctx, label, current_len - added_count + j, &start[j], stack_pointer); + } +} + #define DUMP_UOP dump_uop +#define DUMP_UOPS dump_uops #else #define DPRINTF(level, ...) #define DUMP_UOP(ctx, label, index, instr, stack_pointer) + #define DUMP_UOPS(ctx, label, start, stack_pointer) #endif static int @@ -508,7 +521,7 @@ optimize_uops( *(ctx->out_buffer.next++) = *this_instr; } assert(ctx->frame != NULL); - DUMP_UOP(ctx, "out", uop_buffer_length(&ctx->out_buffer) - 1, out_ptr, stack_pointer); + DUMP_UOPS(ctx, "out", out_ptr, stack_pointer); if (!CURRENT_FRAME_IS_INIT_SHIM() && !ctx->done) { DPRINTF(3, " stack_level %d\n", STACK_LEVEL()); ctx->frame->stack_pointer = stack_pointer; From 2ac620a1753f1e61a98f890d13bfe3059f39273c Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 11:57:31 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst new file mode 100644 index 00000000000000..927b1fe480d6fd --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst @@ -0,0 +1 @@ +Fix missing output uops in JIT optimizer debug output. From 11509a0fbea81124686e14aeb197b2d8d81177aa Mon Sep 17 00:00:00 2001 From: Hai Zhu Date: Mon, 9 Feb 2026 20:16:53 +0800 Subject: [PATCH 3/3] Delete Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst --- .../2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst deleted file mode 100644 index 927b1fe480d6fd..00000000000000 --- a/Misc/NEWS.d/next/Core_and_Builtins/2026-02-09-11-57-29.gh-issue-144623.QLDbZo.rst +++ /dev/null @@ -1 +0,0 @@ -Fix missing output uops in JIT optimizer debug output.