Move SimplifyLocals before ConstProp.
This commit is contained in:
parent
22e9e52c84
commit
028b4745f4
43 changed files with 348 additions and 436 deletions
|
@ -379,9 +379,21 @@ fn save_unreachable_coverage(
|
|||
));
|
||||
}
|
||||
|
||||
pub struct SimplifyLocals;
|
||||
pub struct SimplifyLocals {
|
||||
label: String,
|
||||
}
|
||||
|
||||
impl SimplifyLocals {
|
||||
pub fn new(label: &str) -> SimplifyLocals {
|
||||
SimplifyLocals { label: format!("SimplifyLocals-{}", label) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for SimplifyLocals {
|
||||
fn name(&self) -> &str {
|
||||
&self.label
|
||||
}
|
||||
|
||||
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
|
||||
sess.mir_opt_level() > 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue