-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Add new interface to smir #115187
Add new interface to smir #115187
Conversation
This PR changes Stable MIR cc @oli-obk, @celinval, @spastorino These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to set assignee to
|
Could not assign reviewer from: |
// No need to keep going. | ||
Compilation::Stop | ||
} | ||
rustc_internal::StableMir::new(args, test_stable_mir).run(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the piecemeal comments. I was playing with this code while creating a test driver for stable-mir. I was wondering if we could move this to the stable_mir
module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #115187 (comment) I think it should stay in rustc_internal
for now.
c2c1e7e
to
c71443d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Shouldn't we move |
9c3b71f
to
031a961
Compare
use crate::rustc_internal; | ||
use crate::rustc_smir::Tables; | ||
use rustc_driver::{Callbacks, Compilation, RunCompiler}; | ||
use rustc_interface::{interface, Queries}; | ||
use rustc_middle::ty::TyCtxt; | ||
use rustc_session::EarlyErrorHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not have any rustc_*
stuff inside the stable_mir
modules. Everything should be abstracted via the Context
trait. Otherwise we will not be able to build the SMIR crate on stable on crates.io in the future.
In this case, we cannot abstract it, because in order to get a Context
instance, we first need to start up rustc. Let's figure out how to handle this best separately. for now, move this logic to where rustc_internal::run
lives.
This comment has been minimized.
This comment has been minimized.
@bors delegate+ r= me with CI fixed and commits squashed |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#111580 (Don't ICE on layout computation failure) - rust-lang#114923 (doc: update lld-flavor ref) - rust-lang#115174 (tests: add test for rust-lang#67992) - rust-lang#115187 (Add new interface to smir) - rust-lang#115300 (Tweaks and improvements on SMIR around generics_of and predicates_of) - rust-lang#115340 (some more is_zst that should be is_1zst) r? `@ghost` `@rustbot` modify labels: rollup
Removes the boiler plate from
crate-info.rs
, and creates new interface for the smir.Addressing rust-lang/project-stable-mir#23
r? @spastorino