Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5d55fae

Browse files
committedFeb 15, 2025
Do partial SsaLocals analysis in unoptimized builds
1 parent d8810e3 commit 5d55fae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+335
-280
lines changed
 

‎compiler/rustc_mir_transform/src/multiple_return_terminators.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::simplify;
1010
pub(super) struct MultipleReturnTerminators;
1111

1212
impl<'tcx> crate::MirPass<'tcx> for MultipleReturnTerminators {
13-
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
14-
sess.mir_opt_level() >= 4
13+
fn is_enabled(&self, tcx: TyCtxt<'tcx>) -> bool {
14+
tcx.sess.mir_opt_level() >= 4
1515
}
1616

1717
fn run_pass(&self, _: TyCtxt<'tcx>, body: &mut Body<'tcx>) {

‎compiler/rustc_mir_transform/src/nrvo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ use tracing::{debug, trace};
3333
pub(super) struct RenameReturnPlace;
3434

3535
impl<'tcx> crate::MirPass<'tcx> for RenameReturnPlace {
36-
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
36+
fn is_enabled(&self, tcx: TyCtxt<'tcx>) -> bool {
3737
// unsound: #111005
38-
sess.mir_opt_level() > 0 && sess.opts.unstable_opts.unsound_mir_opts
38+
tcx.sess.mir_opt_level() > 0 && tcx.sess.opts.unstable_opts.unsound_mir_opts
3939
}
4040

4141
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut mir::Body<'tcx>) {
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.