rust/compiler/rustc_codegen_cranelift/src
bors 3be68033b6 Auto merge of #145513 - beepster4096:erasedereftemps, r=saethlin,cjgillot
Validate CopyForDeref and DerefTemps better and remove them from runtime MIR

(split from my WIP rust-lang/rust#145344)

This PR:
- Removes `Rvalue::CopyForDeref` and `LocalInfo::DerefTemp` from runtime MIR
    - Using a new mir pass `EraseDerefTemps`
    - `CopyForDeref(x)` is turned into `Use(Copy(x))`
    - `DerefTemp` is turned into `Boring`
        - Not sure if this part is actually necessary, it made more sense in rust-lang/rust#145344 with `DerefTemp` storing actual data that I wanted to keep from having to be kept in sync with the rest of the body in runtime MIR
- Checks in validation that `CopyForDeref` and `DerefTemp` are only used together
- Removes special handling for `CopyForDeref` from many places
- Removes `CopyForDeref` from `custom_mir` reverting rust-lang/rust#111587
    - In runtime MIR simple copies can be used instead
    - In post cleanup analysis MIR it was already wrong to use due to the lack of support for creating `DerefTemp` locals
    - Possibly this should be its own PR?
 - Adds an argument to `deref_finder` to avoid creating new `DerefTemp`s and `CopyForDeref` in runtime MIR.
     - Ideally we would just avoid making intermediate derefs instead of fixing it at the end of a pass / during shim building
 - Removes some usages of `deref_finder` that I found out don't actually do anything

r? oli-obk
2025-10-12 02:34:20 +00:00
..
abi remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
debuginfo remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
driver Ensure fat LTO doesn't merge everything into the allocator module 2025-09-06 13:31:41 +00:00
intrinsics atomicrmw on pointers: move integer-pointer cast hacks into backend 2025-07-23 08:32:55 +02:00
optimize Reformat use declarations. 2024-07-29 08:26:52 +10:00
allocator.rs Make __rust_alloc_error_handler_should_panic a function 2025-07-03 10:52:21 -07:00
analyze.rs rename AddressOf -> RawBorrow inside the compiler 2024-08-18 19:46:53 +02:00
base.rs Auto merge of #145513 - beepster4096:erasedereftemps, r=saethlin,cjgillot 2025-10-12 02:34:20 +00:00
cast.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
codegen_f16_f128.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
codegen_i128.rs Windows x86: Change i128 to return via the vector ABI 2025-01-27 12:12:59 +00:00
common.rs Add an attribute to check the number of lanes in a SIMD vector after monomorphization 2025-09-23 20:47:34 -04:00
compiler_builtins.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
concurrency_limiter.rs Remove jobserver from Session 2024-12-13 10:21:22 +00:00
config.rs Merge commit 'ba315abda7' into sync_cg_clif-2025-03-30 2025-03-30 15:43:48 +00:00
constant.rs Remove StatementKind::Deinit. 2025-10-10 12:57:24 +00:00
discriminant.rs Change tag_field to FieldIdx in Variants::Multiple 2025-06-03 23:42:21 -07:00
global_asm.rs Add an attribute to check the number of lanes in a SIMD vector after monomorphization 2025-09-23 20:47:34 -04:00
inline_asm.rs Update InterpCx::project_field to take FieldIdx 2025-06-05 19:15:56 -07:00
lib.rs Add a leading dash to linker plugin arguments in the gcc codegen 2025-09-28 13:57:33 -04:00
linkage.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
main_shim.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
num.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
pointer.rs Merge commit '1fa693ca44' into sync_cg_clif-2024-11-09 2024-11-09 13:48:06 +00:00
pretty_clif.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
toolchain.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
unsize.rs remove explicit deref of AbiAlign for most methods 2025-09-28 15:02:14 -07:00
unwind_module.rs Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
value_and_place.rs Auto merge of #147055 - beepster4096:subtype_is_not_a_projection, r=lcnr 2025-10-02 01:54:48 +00:00
vtable.rs Remove support for dyn* 2025-07-01 19:00:21 +00:00