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

Migrate hooks and place modules to use mostly StableMIR APIs #2910

Merged
merged 13 commits into from
Dec 9, 2023

Conversation

celinval
Copy link
Contributor

@celinval celinval commented Dec 2, 2023

The main changes needed to make this migration besides a few method call tweaks were:

  1. Adapt FunctionCtx to cache information about the StableMIR version of instance and its body.
    • I also cleaned up how we were handling basic blocks which were unnecessary.
  2. Created a new ty_stable module that provide stable versions to retrieve type information from StableMIR.
    • I decided to keep these separate so it is cleaner for now. I foresee that the type module will still rely on internal APIs for the next little while, so separating them here made sense to me.
  3. Since Place when retrieved from StableMIR body already comes monomorphized, I modified the existing codegen_place to preemptively monomorphize Place before converting it to a Stable version and invoking codegen_place_stable.

Call-outs

Leaving this as a draft for now since this still depends on the following PRs to be merged into the Rust compiler:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@github-actions github-actions bot added the Z-BenchCI Tag a PR to run benchmark CI label Dec 2, 2023
@celinval celinval assigned JustusAdam and celinval and unassigned JustusAdam Dec 4, 2023
We will need the same logic for other components as we slowly migrate
to StableMIR. Move that to `ty_stable.rs` for now.
@celinval celinval marked this pull request as ready for review December 8, 2023 16:17
@celinval celinval requested a review from a team as a code owner December 8, 2023 16:17
Copy link
Contributor

@adpaco-aws adpaco-aws left a comment

Choose a reason for hiding this comment

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

Thanks, @celinval !

@adpaco-aws adpaco-aws enabled auto-merge (squash) December 9, 2023 14:30
@adpaco-aws adpaco-aws merged commit 4c04c8e into model-checking:main Dec 9, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-BenchCI Tag a PR to run benchmark CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants