rust/compiler/rustc_mir_transform/src
DianQK c16c22cc9c
Simplify the canonical clone method to copy
The optimized clone method ends up as the following MIR:

```
_2 = copy ((*_1).0: i32);
_3 = copy ((*_1).1: u64);
_4 = copy ((*_1).2: [i8; 3]);
_0 = Foo { a: move _2, b: move _3, c: move _4 };
```

We can transform this to:

```
_0 = copy (*_1);
```
2024-09-14 13:30:35 +08:00
..
coroutine Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
coverage coverage: Simplify creation of sum counters 2024-09-12 15:50:32 +10:00
inline Remove #[macro_use] extern crate tracing from rustc_mir_transform. 2024-08-30 10:01:34 +10:00
shim Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
abort_unwinding_calls.rs Streamline AbortUnwindingCalls. 2024-09-09 15:15:42 +10:00
add_call_guards.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
add_moves_for_packed_drops.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
add_retag.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
add_subtyping_projections.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
check_alignment.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
check_const_item_mutation.rs Simplify some nested if statements 2024-09-11 13:45:23 -04:00
check_packed_ref.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
cleanup_post_borrowck.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
copy_prop.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
coroutine.rs Rename FlowState as Domain. 2024-09-13 16:27:24 +10:00
cost_checker.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
cross_crate_inline.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
ctfe_limit.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
dataflow_const_prop.rs Rollup merge of #130297 - nnethercote:dataflow-cleanups, r=cjgillot 2024-09-13 18:25:45 +02:00
dead_store_elimination.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
deduce_param_attrs.rs Simplify some nested if statements 2024-09-11 13:45:23 -04:00
deduplicate_blocks.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
deref_separator.rs Use LocalDecls in a couple of places. 2024-09-09 15:15:44 +10:00
dest_prop.rs Remove references from some structs. 2024-09-10 09:11:17 +10:00
dump_mir.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
early_otherwise_branch.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
elaborate_box_derefs.rs Use let/else to de-indent ElaborateBoxDerefs::run_pass. 2024-09-09 15:15:43 +10:00
elaborate_drops.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
errors.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
ffi_unwind_calls.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
function_item_references.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
gvn.rs Simplify the canonical clone method to copy 2024-09-14 13:30:35 +08:00
inline.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
instsimplify.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
jump_threading.rs Remove references from some structs. 2024-09-10 09:11:17 +10:00
known_panics_lint.rs Simplify some nested if statements 2024-09-11 13:45:23 -04:00
large_enums.rs Add a useful comment. 2024-09-10 08:54:22 +10:00
lib.rs Make check_live_drops into a MirLint. 2024-09-10 09:11:17 +10:00
lint.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
lower_intrinsics.rs Improve consistency in LowerIntrinsics. 2024-09-09 15:15:44 +10:00
lower_slice_len.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
match_branches.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
mentioned_items.rs Remove references from some structs. 2024-09-10 09:11:17 +10:00
multiple_return_terminators.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
nrvo.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
pass_manager.rs Rollup merge of #130101 - RalfJung:const-cleanup, r=fee1-dead 2024-09-12 19:03:41 +02:00
post_drop_elaboration.rs Make check_live_drops into a MirLint. 2024-09-10 09:11:17 +10:00
prettify.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
promote_consts.rs Add a useful comment about PromoteTemps. 2024-09-10 08:54:45 +10:00
ref_prop.rs Remove references from some structs. 2024-09-10 09:11:17 +10:00
remove_noop_landing_pads.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
remove_place_mention.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
remove_storage_markers.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
remove_uninit_drops.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
remove_unneeded_drops.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
remove_zsts.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
required_consts.rs Remove references from some structs. 2024-09-10 09:11:17 +10:00
reveal_all.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
sanity_check.rs Move MirPass to rustc_mir_transform. 2024-09-03 16:03:46 +10:00
shim.rs Use IndexVec::from_raw to construct a const IndexVec. 2024-09-10 09:11:17 +10:00
simplify_branches.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
simplify_comparison_integral.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
simplify.rs Inline and remove some functions. 2024-09-10 08:54:17 +10:00
single_use_consts.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
sroa.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
ssa.rs Reduce visibilities, and add warn(unreachable_pub). 2024-09-09 08:48:09 +10:00
unreachable_enum_branching.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
unreachable_prop.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00
validate.rs Improve comment formatting. 2024-09-10 08:42:30 +10:00