rust/compiler/rustc_mir_transform/src
Dylan DPC c66e0c8726
Rollup merge of #94655 - JakobDegen:mir-phase-docs, r=oli-obk
Clarify which kinds of MIR are allowed during which phases.

This enhances documentation with these details and extends the validator to check these requirements more thoroughly. Most of these conditions were already being checked.

There was also some disagreement between the `MirPhase` docs and validator as to what it meant for the `body.phase` field to have a certain value. This PR resolves those disagreements in favor of the `MirPhase` docs (which is what the pass manager implemented), adjusting the validator accordingly. The result is now that the `DropLowering` phase begins with the end of the elaborate drops pass, and lasts until the beginning of the generator lowring pass. This doesn't feel entirely natural to me, but as long as it's documented accurately it should be ok.

r? rust-lang/mir-opt
2022-03-25 01:34:29 +01:00
..
coverage add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
inline Adopt let else in more places 2022-02-19 17:27:43 +01:00
abort_unwinding_calls.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
add_call_guards.rs Move rustc_mir::transform to rustc_mir_transform. 2021-09-07 00:43:14 +02:00
add_moves_for_packed_drops.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
add_retag.rs Remove in_band_lifetimes from rustc_mir_transform 2021-12-07 21:04:40 -08:00
check_const_item_mutation.rs rustc_error: make ErrorReported impossible to construct 2022-03-16 10:35:24 -05:00
check_packed_ref.rs rustc_error: make ErrorReported impossible to construct 2022-03-16 10:35:24 -05:00
check_unsafety.rs resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
cleanup_post_borrowck.rs Move rustc_mir::transform to rustc_mir_transform. 2021-09-07 00:43:14 +02:00
const_debuginfo.rs resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
const_goto.rs Remove in_band_lifetimes from rustc_mir_transform 2021-12-07 21:04:40 -08:00
const_prop.rs separate const prop lint from optimizations 2022-03-23 16:50:41 +00:00
const_prop_lint.rs Address rebase fallout 2022-03-23 17:01:04 +00:00
deaggregator.rs Clarify which kinds of MIR are allowed during which phases. 2022-03-23 18:34:08 -04:00
deduplicate_blocks.rs Remove in_band_lifetimes from rustc_mir_transform 2021-12-07 21:04:40 -08:00
dest_prop.rs 7 - Make more use of let_chains 2022-03-01 07:43:12 -03:00
dump_mir.rs Inline on_mir_pass and add inline to dump_mir 2021-10-14 15:26:59 -05:00
early_otherwise_branch.rs Disable early otherwise branch MIR opt 2022-03-20 23:25:59 -04:00
elaborate_drops.rs Clarify which kinds of MIR are allowed during which phases. 2022-03-23 18:34:08 -04:00
function_item_references.rs remove TyS::same_type 2022-02-01 11:21:26 +01:00
generator.rs Clarify which kinds of MIR are allowed during which phases. 2022-03-23 18:34:08 -04:00
inline.rs 7 - Make more use of let_chains 2022-03-01 07:43:12 -03:00
instcombine.rs Move is_trivially_pure_clone_copy onto Ty instead 2022-03-10 01:19:02 -08:00
lib.rs Rollup merge of #94655 - JakobDegen:mir-phase-docs, r=oli-obk 2022-03-25 01:34:29 +01:00
lower_intrinsics.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
lower_slice_len.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
marker.rs Add pass for simple phase change 2021-12-02 17:31:38 -08:00
match_branches.rs Update passes with new interface 2021-12-02 17:31:38 -08:00
multiple_return_terminators.rs Update passes with new interface 2021-12-02 17:31:38 -08:00
normalize_array_len.rs Rollup merge of #94011 - est31:let_else, r=lcnr 2022-02-17 23:00:59 +01:00
nrvo.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
pass_manager.rs Clarify which kinds of MIR are allowed during which phases. 2022-03-23 18:34:08 -04:00
remove_false_edges.rs Separate RemoveFalseEdges from SimplifyBranches 2021-11-30 17:14:48 -08:00
remove_noop_landing_pads.rs Remove deprecated LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
remove_storage_markers.rs Update passes with new interface 2021-12-02 17:31:38 -08:00
remove_uninit_drops.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
remove_unneeded_drops.rs Add rationale for RemoveUnneededDrops 2021-11-30 17:25:30 -08:00
remove_zsts.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
required_consts.rs 7 - Make more use of let_chains 2022-03-01 07:43:12 -03:00
reveal_all.rs Overhaul TyS and Ty. 2022-02-15 16:03:24 +11:00
separate_const_switch.rs Remove deprecated LLVM-style inline assembly 2022-01-12 18:51:31 +01:00
shim.rs Improve AdtDef interning. 2022-03-11 13:31:24 +11:00
simplify.rs Adopt let else in more places 2022-02-19 17:27:43 +01:00
simplify_branches.rs Auto merge of #91279 - scottmcm:small-refactor, r=nagisa 2021-12-06 13:04:18 +00:00
simplify_comparison_integral.rs Remove in_band_lifetimes from rustc_mir_transform 2021-12-07 21:04:40 -08:00
simplify_try.rs resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
uninhabited_enum_branching.rs Clarify Layout interning. 2022-03-07 13:41:47 +11:00
unreachable_prop.rs Remove deprecated LLVM-style inline assembly 2022-01-12 18:51:31 +01:00