Rollup merge of #107172 - cjgillot:no-nal, r=nagisa
Reimplement NormalizeArrayLen based on SsaLocals Based on https://github.com/rust-lang/rust/pull/106908 Fixes https://github.com/rust-lang/rust/issues/105929 Only the last commit "Reimplement NormalizeArrayLen" is relevant.
This commit is contained in:
commit
db9774951d
17 changed files with 192 additions and 437 deletions
|
@ -548,13 +548,13 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
|||
&[
|
||||
&reveal_all::RevealAll, // has to be done before inlining, since inlined code is in RevealAll mode.
|
||||
&lower_slice_len::LowerSliceLenCalls, // has to be done before inlining, otherwise actual call will be almost always inlined. Also simple, so can just do first
|
||||
&normalize_array_len::NormalizeArrayLen, // has to run after `slice::len` lowering
|
||||
&unreachable_prop::UnreachablePropagation,
|
||||
&uninhabited_enum_branching::UninhabitedEnumBranching,
|
||||
&o1(simplify::SimplifyCfg::new("after-uninhabited-enum-branching")),
|
||||
&inline::Inline,
|
||||
&remove_storage_markers::RemoveStorageMarkers,
|
||||
&remove_zsts::RemoveZsts,
|
||||
&normalize_array_len::NormalizeArrayLen, // has to run after `slice::len` lowering
|
||||
&const_goto::ConstGoto,
|
||||
&remove_unneeded_drops::RemoveUnneededDrops,
|
||||
&sroa::ScalarReplacementOfAggregates,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue