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

analyze: refactor MIR rewrite generation #919

Merged
merged 12 commits into from
May 11, 2023

Conversation

spernsteiner
Copy link
Contributor

This branch refactors mir_op to make the generation of conversions more uniform. Ideally, we should call emit_cast_* in roughly every place where dataflow::type_check adds a dataflow edge. This branch doesn't fully implement that, but gets us a little closer.

This also adds a new TypeDesc type, which bundles up Ownership, Quantity, and a pointee Ty into a complete description of a rewritten pointer type. This is used for some of the new emit_cast_* machinery.

Based on #918 for now; once this is approved, I'll rebase onto master

@spernsteiner spernsteiner changed the base branch from analyze-misc-fixes-20230509 to analyze-refactor-mir-casts-base May 10, 2023 16:22
Copy link
Contributor

@aneksteind aneksteind left a comment

Choose a reason for hiding this comment

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

LGTM, some nice-to-have but nothing blocking

@spernsteiner
Copy link
Contributor Author

I rebased this onto master, but a test is now failing

@spernsteiner
Copy link
Contributor Author

Fixed the test failure by skipping rewrite generation for void* casts. We can do something more intelligent with those later when we add proper rewriting of malloc/free/memcpy/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants