1
Fork 0

Auto merge of #77396 - wesleywiser:disable-simplifyarmidentity, r=oli-obk

Disable the SimplifyArmIdentity mir-opt

The optimization still has some bugs that need to be worked out
such as #77359.

We can try re-enabling this again after the known issues are resolved.

r? `@oli-obk`
This commit is contained in:
bors 2020-10-02 10:04:46 +00:00
commit 4dedf5edd5
13 changed files with 195 additions and 152 deletions

View file

@ -367,7 +367,12 @@ fn optimization_applies<'tcx>(
}
impl<'tcx> MirPass<'tcx> for SimplifyArmIdentity {
fn run_pass(&self, _tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) {
fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) {
// FIXME(77359): This optimization can result in unsoundness.
if !tcx.sess.opts.debugging_opts.unsound_mir_opts {
return;
}
trace!("running SimplifyArmIdentity on {:?}", source);
let local_uses = LocalUseCounter::get_local_uses(body);
let (basic_blocks, local_decls, debug_info) =