rust/compiler/rustc_mir_transform/src
Matthias Krüger 6917040cf0
Rollup merge of #107524 - cjgillot:both-storage, r=RalfJung
Remove both StorageLive and StorageDead in CopyProp.

Fixes https://github.com/rust-lang/rust/issues/107511

https://github.com/rust-lang/rust/pull/106908 removed StorageDead without the accompanying StorageLive. In loops, execution would see repeated StorageLive, without any StorageDead, which is UB.

So when removing storage statements, we have to remove both StorageLive and StorageDead.

~I also added a MIR validation pass for StorageLive. It may be a bit overzealous.~
2023-02-02 17:14:06 +01:00
..
coverage Replace enum ==s with matches where it makes sense 2023-01-30 12:26:26 +00: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 Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
check_const_item_mutation.rs Refactor rustc lint API 2022-10-01 10:03:06 +00:00
check_packed_ref.rs make unaligned_reference a hard error 2023-01-31 20:28:11 +01:00
check_unsafety.rs Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk 2023-01-29 04:11:27 +00:00
cleanup_post_borrowck.rs Remove false edges in CleanupPostBorrowck 2022-12-17 19:34:45 +01:00
const_debuginfo.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
const_goto.rs Disable ConstGoto opt in cleanup blocks 2023-01-26 03:50:37 -08:00
const_prop.rs Replace some _ == _ || _ == _s with matches!(_, _ | _)s 2023-01-30 12:26:26 +00:00
const_prop_lint.rs Replace some _ == _ || _ == _s with matches!(_, _ | _)s 2023-01-30 12:26:26 +00:00
copy_prop.rs Remove both StorageLive and StorageDead in CopyProp. 2023-01-31 17:50:04 +00:00
ctfe_limit.rs Improve efficiency of has_back_edge(...) 2023-01-24 00:01:37 +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 Create stable metric to measure long computation in Const Eval 2023-01-23 23:56:22 +00:00
deaggregator.rs Refactor MIR phases 2022-08-30 01:40:14 -07:00
deduce_param_attrs.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01: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 Auto merge of #106908 - cjgillot:copyprop-ssa, r=oli-obk 2023-01-29 13:01:06 +00: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 fix up subst_identity vs skip_binder; add some FIXMEs as identified in review 2023-01-26 20:28:31 -07:00
generator.rs Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk 2023-01-29 04:11:27 +00:00
inline.rs Remember where a type was kept in MIR. 2023-01-27 18:59:32 +00:00
instcombine.rs Thread a ParamEnv down to might_permit_raw_init 2023-01-23 19:25:10 -05:00
lib.rs Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors 2023-01-31 02:46:11 +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 Remove obsolete comment. 2023-01-29 22:09:51 +00: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_noop_landing_pads.rs Create stable metric to measure long computation in Const Eval 2023-01-23 23:56:22 +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 Create stable metric to measure long computation in Const Eval 2023-01-23 23:56:22 +00:00
shim.rs Use Mutability::{is_mut, is_not} 2023-01-30 12:26:26 +00:00
simplify.rs Auto merge of #106908 - cjgillot:copyprop-ssa, r=oli-obk 2023-01-29 13:01:06 +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
sroa.rs Remove double spaces after dots in comments 2023-01-17 08:09:33 +00:00
ssa.rs Use successor location for dominator check. 2023-01-27 18:22:45 +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 Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00