remove check from const promotion

This commit is contained in:
cjkenn 2020-11-19 08:21:20 -05:00
parent b556690c53
commit 1d3305aa66

View File

@ -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);