Skip to content

gh-143421: Use new buffer to save optimized uops#143682

Merged
Fidget-Spinner merged 12 commits into
python:mainfrom
cocolato:feat/ADD_OP
Jan 17, 2026
Merged

gh-143421: Use new buffer to save optimized uops#143682
Fidget-Spinner merged 12 commits into
python:mainfrom
cocolato:feat/ADD_OP

Conversation

@cocolato

@cocolato cocolato commented Jan 11, 2026

Copy link
Copy Markdown
Member

@python-cla-bot

python-cla-bot Bot commented Jan 11, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@cocolato

Copy link
Copy Markdown
Member Author

@Fidget-Spinner There may be many details that need fixing, and I hope you can give me some suggestions.

@cocolato

cocolato commented Jan 11, 2026

Copy link
Copy Markdown
Member Author

I haven't yet removed the cases of REPLACE_OP((inst+1),...), perhaps there's a better way to achieve this.

REPLACE_OP((this_instr+1), _EXIT_TRACE, 0, 0);

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is really valuable work. We definitely need this.

Comment thread Python/optimizer_analysis.c Outdated
Comment thread Python/optimizer_analysis.c Outdated
Comment thread Include/internal/pycore_optimizer_types.h Outdated
Comment thread Python/optimizer_analysis.c Outdated
Comment thread Python/optimizer_bytecodes.c
Comment thread Python/optimizer_analysis.c
@cocolato

cocolato commented Jan 11, 2026

Copy link
Copy Markdown
Member Author

Thanks for taking the time to review this! I will rewrite them later.

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite close.

Comment thread Include/internal/pycore_tstate.h Outdated
Comment thread Include/internal/pycore_optimizer_types.h Outdated
@cocolato

cocolato commented Jan 12, 2026

Copy link
Copy Markdown
Member Author

Updated, thanks for your patient guidance!

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, last few minor comments. then I think this is ready to merge.

Thank you for your patience in enduring my comments :).

Comment thread Python/optimizer_analysis.c Outdated
Comment thread Python/optimizer_analysis.c Outdated
Comment thread Python/optimizer_analysis.c Outdated
@cocolato

Copy link
Copy Markdown
Member Author

I may have misunderstood the previous comment. Thank you again for your guidance!

@Fidget-Spinner

Copy link
Copy Markdown
Member

Will leave this open for three days in case any other people want to review.

@Fidget-Spinner Fidget-Spinner merged commit b4b7324 into python:main Jan 17, 2026
72 checks passed
@Fidget-Spinner

Copy link
Copy Markdown
Member

Thanks!

@cocolato cocolato deleted the feat/ADD_OP branch January 20, 2026 14:13
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants