1
Fork 0

Auto merge of #111007 - JakobDegen:nrvo, r=tmiasko

Disable nrvo mir opt

See #111005 and #110902 . The ICE can definitely be hit on stable, the miscompilation I'm not sure about. The pass makes some pretty sketchy assumptions though, and we should not have it on while that's the case.

I'm not going to work on actually fixing this, it's probably not excessively difficult though.

r? rust-lang/mir-opt
This commit is contained in:
bors 2023-05-08 18:10:26 +00:00
commit dfe31889e1
20 changed files with 247 additions and 574 deletions

View file

@ -34,7 +34,8 @@ pub struct RenameReturnPlace;
impl<'tcx> MirPass<'tcx> for RenameReturnPlace {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() > 0
// #111005
sess.mir_opt_level() > 0 && sess.opts.unstable_opts.unsound_mir_opts
}
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut mir::Body<'tcx>) {