Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GH-131688: Mark instructions and uops with DECREF_INPUTS as escaping. #133501

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

Merged
merged 1 commit into from
May 22, 2025

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented May 6, 2025

@@ -832,7 +832,7 @@ def compute_properties(op: parser.CodeDef) -> Properties:
)
error_with_pop = has_error_with_pop(op)
error_without_pop = has_error_without_pop(op)
escapes = bool(escaping_calls)
escapes = bool(escaping_calls) or variable_used(op, "DECREF_INPUTS")
Copy link
Member

Choose a reason for hiding this comment

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

Why does the cases generator not automatically detect this as an escaping call? Special casing it here seems fragile.

Copy link
Member

Choose a reason for hiding this comment

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

No UPPERCASE calls are treated as escaping, since we just assume they’re macros or DSL magic. Maybe we should remove that rule and just add all of the existing stuff to the non-escaping allowlist?

Copy link
Member Author

Choose a reason for hiding this comment

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

DECREF_INPUTS is not treated as an escaping call. We treat it specially.
So we'd need to add it to the whitelist and still add this case.

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Looks good. Not a huge fan of special-cases, but they can be hard to avoid in situations like this.

@markshannon markshannon merged commit fbe7b87 into python:main May 22, 2025
55 checks passed
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.