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

Implement a MIR parser for testing purposes #91669

Closed
fee1-dead opened this issue Dec 8, 2021 · 3 comments
Closed

Implement a MIR parser for testing purposes #91669

fee1-dead opened this issue Dec 8, 2021 · 3 comments
Assignees
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html A-mir-opt Area: MIR optimizations A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@fee1-dead
Copy link
Member

fee1-dead commented Dec 8, 2021

As discussed in Zulip (archive), we'd want to be able to write tests where the input is MIR and not Rust to test soundness of certain MIR optimizations. This would require a MIR parser for internal usage only and test mir-opt with that. Codegen tests would probably benefit from this as well.

See also rust-lang/miri#196

@fee1-dead fee1-dead added A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html A-mir-opt Area: MIR optimizations labels Dec 8, 2021
@spunit262
Copy link
Contributor

@rustbot claim

@fee1-dead
Copy link
Member Author

@spunit262 thank you for being willing to tackle this issue. If you get stuck, you can ask a question here by posting a comment or post a message on zulip. You can also dm anyone from @rust-lang/wg-const-eval (me, @oli-obk, @RalfJung, @lcnr), we'd be happy to help out.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 23, 2023

we now have #[custom_mir] that, while still having a few missing pieces to implement, is exactly implementing what this issue is requesting

@oli-obk oli-obk closed this as completed Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html A-mir-opt Area: MIR optimizations A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants