Always propagate into operands.

This commit is contained in:
Camille GILLOT 2023-02-07 19:24:21 +00:00
parent 1554942cdc
commit 12a2edd149
50 changed files with 114 additions and 140 deletions

View file

@ -810,12 +810,7 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, location: Location) {
self.super_operand(operand, location);
// Only const prop copies and moves on `mir_opt_level=3` as doing so
// currently slightly increases compile time in some cases.
if self.tcx.sess.mir_opt_level() >= 3 {
self.propagate_operand(operand)
}
self.propagate_operand(operand)
}
fn process_projection_elem(