Rename CleanupNonCodegenStatements to CleanupPostBorrowck
This commit is contained in:
parent
2a8513d221
commit
4c3efc7f1b
3 changed files with 4 additions and 4 deletions
|
@ -22,9 +22,9 @@ use crate::MirPass;
|
||||||
use rustc_middle::mir::{Body, BorrowKind, Rvalue, StatementKind};
|
use rustc_middle::mir::{Body, BorrowKind, Rvalue, StatementKind};
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
|
|
||||||
pub struct CleanupNonCodegenStatements;
|
pub struct CleanupPostBorrowck;
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for CleanupNonCodegenStatements {
|
impl<'tcx> MirPass<'tcx> for CleanupPostBorrowck {
|
||||||
fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
for basic_block in body.basic_blocks.as_mut_preserves_cfg() {
|
for basic_block in body.basic_blocks.as_mut_preserves_cfg() {
|
||||||
for statement in basic_block.statements.iter_mut() {
|
for statement in basic_block.statements.iter_mut() {
|
||||||
|
|
|
@ -497,7 +497,7 @@ fn run_analysis_cleanup_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
&remove_false_edges::RemoveFalseEdges,
|
&remove_false_edges::RemoveFalseEdges,
|
||||||
&simplify_branches::SimplifyConstCondition::new("initial"),
|
&simplify_branches::SimplifyConstCondition::new("initial"),
|
||||||
&remove_noop_landing_pads::RemoveNoopLandingPads,
|
&remove_noop_landing_pads::RemoveNoopLandingPads,
|
||||||
&cleanup_post_borrowck::CleanupNonCodegenStatements,
|
&cleanup_post_borrowck::CleanupPostBorrowck,
|
||||||
&simplify::SimplifyCfg::new("early-opt"),
|
&simplify::SimplifyCfg::new("early-opt"),
|
||||||
&deref_separator::Derefer,
|
&deref_separator::Derefer,
|
||||||
];
|
];
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// ignore-wasm32-bare compiled with panic=abort by default
|
// ignore-wasm32-bare compiled with panic=abort by default
|
||||||
|
|
||||||
// EMIT_MIR remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff
|
// EMIT_MIR remove_fake_borrows.match_guard.CleanupPostBorrowck.diff
|
||||||
fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
|
fn match_guard(x: Option<&&i32>, c: bool) -> i32 {
|
||||||
match x {
|
match x {
|
||||||
Some(0) if c => 0,
|
Some(0) if c => 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue