Update passes with new interface

This commit is contained in:
Dylan MacKenzie 2021-12-02 09:17:32 -08:00
parent c1a501b131
commit fd18b45e11
32 changed files with 142 additions and 99 deletions

View file

@ -26,6 +26,10 @@ use rustc_middle::{
pub struct SimplifyComparisonIntegral;
impl<'tcx> MirPass<'tcx> for SimplifyComparisonIntegral {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() > 0
}
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
trace!("Running SimplifyComparisonIntegral on {:?}", body.source);