Disable SimplifyBranchSame
optimization for now
This commit is contained in:
parent
20489eaca2
commit
dd9b4763a4
1 changed files with 6 additions and 0 deletions
|
@ -544,6 +544,12 @@ pub struct SimplifyBranchSame;
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for SimplifyBranchSame {
|
impl<'tcx> MirPass<'tcx> for SimplifyBranchSame {
|
||||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
|
// This optimization is disabled by default for now due to
|
||||||
|
// soundness concerns; see issue #89485 and PR #89489.
|
||||||
|
if !tcx.sess.opts.debugging_opts.unsound_mir_opts {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
trace!("Running SimplifyBranchSame on {:?}", body.source);
|
trace!("Running SimplifyBranchSame on {:?}", body.source);
|
||||||
let finder = SimplifyBranchSameOptimizationFinder { body, tcx };
|
let finder = SimplifyBranchSameOptimizationFinder { body, tcx };
|
||||||
let opts = finder.find();
|
let opts = finder.find();
|
||||||
|
|
Loading…
Add table
Reference in a new issue