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

MIR episode 6 #14892

Merged
merged 1 commit into from May 29, 2023
Merged

MIR episode 6 #14892

merged 1 commit into from May 29, 2023

Conversation

HKalbasi
Copy link
Member

This PR separates monomorphization from interpreting, and add a monomorphization query to cache the results. Together with making layout queries returning Arc<Layout> instead of Layout (did you know that Layout is a 312 byte struct with a couple of vectors, so it is very costly to clone? I thought it should be very small and cheap) it makes mir interpreting an order of magnitude faster in warmed calls.

It still can't evaluate no test in the r-a repo, but all tests that I tried are hitting #7434 so I hope after that it will become able to interpret some real world test.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 25, 2023
@HKalbasi HKalbasi force-pushed the mir branch 2 times, most recently from cf9c8ac to 2812814 Compare May 25, 2023 17:53
crates/hir-def/src/body/lower.rs Outdated Show resolved Hide resolved
crates/hir-def/src/hir.rs Outdated Show resolved Hide resolved
@HKalbasi HKalbasi force-pushed the mir branch 3 times, most recently from cdf5253 to 11c91da Compare May 25, 2023 21:15
@bors
Copy link
Collaborator

bors commented May 26, 2023

☔ The latest upstream changes (presumably #14904) made this pull request unmergeable. Please resolve the merge conflicts.

@HKalbasi
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented May 29, 2023

📌 Commit 5136879 has been approved by HKalbasi

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 29, 2023

⌛ Testing commit 5136879 with merge bc82952...

@bors
Copy link
Collaborator

bors commented May 29, 2023

☀️ Test successful - checks-actions
Approved by: HKalbasi
Pushing bc82952 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented May 29, 2023

☀️ Test successful - checks-actions
Approved by: HKalbasi
Pushing bc82952 to master...

@bors bors merged commit bc82952 into rust-lang:master May 29, 2023
10 checks passed
@bors
Copy link
Collaborator

bors commented May 29, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

/// }
/// }
/// ```
fn collect_for_loop(&mut self, syntax_ptr: AstPtr<ast::Expr>, e: ast::ForExpr) -> ExprId {
Copy link
Member

Choose a reason for hiding this comment

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

The lowering broke our label resolution it seems, I'm spotting a bunch of undeclared label diagnostics in r-a

bors added a commit that referenced this pull request Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants