Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix indentation
  • Loading branch information
savannahostrowski committed Sep 15, 2025
commit b160d20e489751af8141aa8b3150092cea226f41
18 changes: 1 addition & 17 deletions Python/optimizer_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Tools/cases_generator/optimizer_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def replace_opcode_if_evaluates_pure(
if input_count in input_count_to_uop:
replacement_uop = input_count_to_uop[input_count]
input_desc = "one input" if input_count == 1 else "two inputs"
emitter.emit(f"""
if (sym_is_const(ctx, {outp.name})) {{
emitter.emit(
f"""if (sym_is_const(ctx, {outp.name})) {{
PyObject *result = sym_get_const(ctx, {outp.name});
if (_Py_IsImmortal(result)) {{
// Replace with {replacement_uop} since we have {input_desc} and an immortal result
Expand Down
Loading