rust/compiler/rustc_mir_transform/src
bors ec56537c43 Auto merge of #105356 - JakobDegen:more-custom-mir, r=oli-obk
Custom MIR: Many more improvements

Commits are each atomic changes, best reviewed one at a time, with the exception that the last commit includes all the documentation.

### First commit

Unsafetyck was not correctly disabled before for `dialect = "built"` custom MIR. This is fixed and a regression test is added.

### Second commit

Implements `Discriminant`, `SetDiscriminant`, and `SwitchInt`.

### Third commit

Implements indexing, field, and variant projections.

### Fourth commit

Documents the previous commits and everything else.

There is some amount of weirdness here due to having to beat Rust syntax into cooperating with MIR concepts, but it hopefully should not be too much. All of it is documented.

r? `@oli-obk`
2022-12-15 19:59:48 +00:00
..
coverage Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
inline Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
abort_unwinding_calls.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
add_call_guards.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
add_moves_for_packed_drops.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
add_retag.rs make retagging work even with 'unstable' places 2022-12-06 10:33:34 +01:00
check_const_item_mutation.rs Refactor rustc lint API 2022-10-01 10:03:06 +00:00
check_packed_ref.rs Refactor rustc lint API 2022-10-01 10:03:06 +00:00
check_unsafety.rs Fix unsafetyck disabling for custom MIR 2022-12-14 01:02:35 -08:00
cleanup_post_borrowck.rs Add option to mir::MutVisitor to not invalidate CFG. 2022-08-09 01:51:10 -07:00
const_debuginfo.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
const_goto.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
const_prop_lint.rs interpret: use Either over Result when it is not representing an error condition 2022-11-18 10:18:32 +01:00
const_prop.rs Move alignment failure error reporting to machine 2022-12-15 16:07:35 +00:00
dataflow_const_prop.rs Move alignment failure error reporting to machine 2022-12-15 16:07:35 +00:00
dead_store_elimination.rs Rewrite dest prop. 2022-11-26 18:04:54 -08:00
deaggregator.rs Refactor MIR phases 2022-08-30 01:40:14 -07:00
deduce_param_attrs.rs Rewrite dest prop. 2022-11-26 18:04:54 -08:00
deduplicate_blocks.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
deref_separator.rs Refactor MIR phases 2022-08-30 01:40:14 -07:00
dest_prop.rs Various cleanups to dest prop 2022-12-14 23:11:52 -08:00
dump_mir.rs Auto merge of #105220 - oli-obk:feeding, r=cjgillot 2022-12-06 03:47:41 +00:00
early_otherwise_branch.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
elaborate_box_derefs.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
elaborate_drops.rs Refactor MIR phases 2022-08-30 01:40:14 -07:00
ffi_unwind_calls.rs Refactor rustc lint API 2022-10-01 10:03:06 +00:00
function_item_references.rs Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
generator.rs Don't require owned data in MaybeStorageLive 2022-12-13 04:22:47 -08:00
inline.rs Ensure no one constructs AliasTys themselves 2022-12-14 15:36:39 +00:00
instcombine.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
lib.rs Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-dead 2022-11-17 07:42:27 +00:00
lower_intrinsics.rs Generalize the Assume intrinsic statement to a general Intrinsic statement 2022-09-06 14:18:32 +00:00
lower_slice_len.rs lint: add bad opt access internal lint 2022-07-27 11:24:27 +01:00
match_branches.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
multiple_return_terminators.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
normalize_array_len.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
nrvo.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
pass_manager.rs Use zero based indexing for pass_count 2022-12-02 15:55:24 +00:00
remove_false_edges.rs Separate RemoveFalseEdges from SimplifyBranches 2021-11-30 17:14:48 -08:00
remove_noop_landing_pads.rs Generalize the Assume intrinsic statement to a general Intrinsic statement 2022-09-06 14:18:32 +00:00
remove_storage_markers.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
remove_uninit_drops.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
remove_unneeded_drops.rs Make MIR basic blocks field public 2022-07-07 08:11:49 +02:00
remove_zsts.rs Combine projection and opaque into alias 2022-12-13 17:48:55 +00:00
required_consts.rs Don't ICE when encountering ConstKind::Error in RequiredConstsVisitor 2022-11-10 05:14:04 +00:00
reveal_all.rs Add option to mir::MutVisitor to not invalidate CFG. 2022-08-09 01:51:10 -07:00
separate_const_switch.rs Generalize the Assume intrinsic statement to a general Intrinsic statement 2022-09-06 14:18:32 +00:00
shim.rs Remove many more cases of mk_substs_trait that can now use the iterator scheme` 2022-12-14 15:36:39 +00:00
simplify_branches.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
simplify_comparison_integral.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
simplify_try.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
simplify.rs compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
sroa.rs Enable SROA by at mir-opt level 3. 2022-11-15 17:59:36 +00:00
uninhabited_enum_branching.rs move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
unreachable_prop.rs Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00