Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-122155: Track local variables between pops and pushes in cases generator #122286

Merged
merged 13 commits into from
Aug 1, 2024

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jul 25, 2024

The current design of the cases generator assumes that the code generator can infer all it needs to know from looking at the stack comments of individual micro-ops. However this isn't true within a tier 1 instruction if the intermediate stack grows during an instruction.

This PR tracks local values during micro ops, between them being popped from the stack and pushed back to the stack.

Lib/test/test_generated_cases.py Outdated Show resolved Hide resolved
Tools/cases_generator/stack.py Outdated Show resolved Hide resolved
Tools/cases_generator/optimizer_generator.py Outdated Show resolved Hide resolved
Tools/cases_generator/stack.py Outdated Show resolved Hide resolved
markshannon and others added 4 commits July 30, 2024 09:26
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Paweł Piotr Przeradowski <showerproof86@gmail.com>
@markshannon
Copy link
Member Author

JIT failures are unrelated (an llvm package issue)

@markshannon markshannon merged commit a9d56e3 into python:main Aug 1, 2024
54 of 63 checks passed
@markshannon markshannon deleted the cases-gen-track-locals branch August 6, 2024 10:14
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
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.

4 participants