Auto merge of #110666 - JohnTitor:rollup-3pwilte, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #109949 (rustdoc: migrate `document_type_layout` to askama) - #110622 (Stable hash tag (discriminant) of `GenericArg`) - #110635 (More `IS_ZST` in `library`) - #110640 (compiler/rustc_target: Raise m68k-linux-gnu baseline to 68020) - #110657 (nit: consistent naming for SimplifyConstCondition) - #110659 (rustdoc: clean up JS) - #110660 (Print ty placeholders pretty) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
3128fd8ddf
19 changed files with 200 additions and 180 deletions
|
@ -507,12 +507,12 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
|||
//
|
||||
// Const-prop runs unconditionally, but doesn't mutate the MIR at mir-opt-level=0.
|
||||
&const_debuginfo::ConstDebugInfo,
|
||||
&o1(simplify_branches::SimplifyConstConditionPassName::AfterConstProp),
|
||||
&o1(simplify_branches::SimplifyConstCondition::AfterConstProp),
|
||||
&early_otherwise_branch::EarlyOtherwiseBranch,
|
||||
&simplify_comparison_integral::SimplifyComparisonIntegral,
|
||||
&dead_store_elimination::DeadStoreElimination,
|
||||
&dest_prop::DestinationPropagation,
|
||||
&o1(simplify_branches::SimplifyConstConditionPassName::Final),
|
||||
&o1(simplify_branches::SimplifyConstCondition::Final),
|
||||
&o1(remove_noop_landing_pads::RemoveNoopLandingPads),
|
||||
&o1(simplify::SimplifyCfg::Final),
|
||||
&nrvo::RenameReturnPlace,
|
||||
|
|
|
@ -2,18 +2,16 @@ use crate::MirPass;
|
|||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
|
||||
pub enum SimplifyConstConditionPassName {
|
||||
pub enum SimplifyConstCondition {
|
||||
AfterConstProp,
|
||||
Final,
|
||||
}
|
||||
/// A pass that replaces a branch with a goto when its condition is known.
|
||||
impl<'tcx> MirPass<'tcx> for SimplifyConstConditionPassName {
|
||||
impl<'tcx> MirPass<'tcx> for SimplifyConstCondition {
|
||||
fn name(&self) -> &'static str {
|
||||
match self {
|
||||
SimplifyConstConditionPassName::AfterConstProp => {
|
||||
"SimplifyConstCondition-after-const-prop"
|
||||
}
|
||||
SimplifyConstConditionPassName::Final => "SimplifyConstCondition-final",
|
||||
SimplifyConstCondition::AfterConstProp => "SimplifyConstCondition-after-const-prop",
|
||||
SimplifyConstCondition::Final => "SimplifyConstCondition-final",
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue