From 1d3305aa6668705af71aaab82a004c5c06642246 Mon Sep 17 00:00:00 2001 From: cjkenn Date: Thu, 19 Nov 2020 08:21:20 -0500 Subject: [PATCH] remove check from const promotion --- compiler/rustc_mir/src/transform/promote_consts.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compiler/rustc_mir/src/transform/promote_consts.rs b/compiler/rustc_mir/src/transform/promote_consts.rs index 0539d8fffab..927aae82a36 100644 --- a/compiler/rustc_mir/src/transform/promote_consts.rs +++ b/compiler/rustc_mir/src/transform/promote_consts.rs @@ -60,10 +60,6 @@ impl<'tcx> MirPass<'tcx> for PromoteTemps<'tcx> { return; } - if !tcx.consider_optimizing(|| format!("PromoteTemps {:?} ", body.source.def_id())) { - return; - } - let mut rpo = traversal::reverse_postorder(body); let ccx = ConstCx::new(tcx, body); let (temps, all_candidates) = collect_temps_and_candidates(&ccx, &mut rpo);