Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[mypyc] Provide an easier way to define IR-to-IR transforms#16998

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 17 commits intomasterfrommypyc-ir-transform
Mar 9, 2024

Conversation

@JukkaL
Copy link
Collaborator

This makes it easy to define simple IR-to-IR transforms by subclassingIRTansform and overriding some visit methods.

Add an implementation of a simple copy propagation optimization as an example.

This will be used by the implementation ofmypyc/mypyc#854, and this can also be used for various optimizations.

The IR transform preserves the identities of ops that are not modified. This means that the old IR is no longer valid after the transform, but the transform can be fast since we don't need to allocate many objects if only a small subset of ops will be modified by a transform.

@JukkaL
Copy link
CollaboratorAuthor

cc@ilevkivskyi@msullivan

Copy link
Collaborator

@jhancejhance left a comment

Choose a reason for hiding this comment

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

As mentioned before, we can implement generalized test fixture on the next IR transform we add.

@JukkaLJukkaL merged commitc94d8e3 intomasterMar 9, 2024
@JukkaLJukkaL deleted the mypyc-ir-transform branchMarch 9, 2024 09:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jhancejhancejhance approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JukkaL@jhance

[8]ページ先頭

©2009-2025 Movatter.jp