rust/compiler/rustc_codegen_ssa/src/traits
Jakub Beránek fd6b24f162
Rollup merge of #142383 - scottmcm:operandref-builder, r=workingjubilee
CodeGen: rework Aggregate implemention for rvalue_creates_operand cases

A non-trivial refactor pulled out from rust-lang/rust#138759
r? workingjubilee

The previous implementation I'd written here based on `index_by_increasing_offset` is complicated to follow and difficult to extend to non-structs.

This changes the implementation, without actually changing any codegen (thus no test changes either), to be more like the existing `extract_field` (<2b0274c71d/compiler/rustc_codegen_ssa/src/mir/operand.rs (L345-L425)>) in that it allows setting a particular field directly.

Notably I've found this one much easier to get right, in particular because having the `OperandRef<Result<V, Scalar>>` gives a really useful thing to include in ICE messages if something did happen to go wrong.
2025-06-18 18:06:50 +02:00
..
abi.rs Remove an unused lifetime param 2025-02-24 15:11:29 +00:00
asm.rs Pass &mut self to codegen_global_asm 2025-04-14 09:38:04 +00:00
backend.rs Move metadata object generation for dylibs to the linker code 2025-06-03 10:04:34 +00:00
builder.rs Simplify implementation of Rust intrinsics by using type parameters in the cache 2025-06-12 00:32:42 +05:30
consts.rs Rollup merge of #137549 - oli-obk:llvm-ffi, r=davidtwco 2025-03-07 19:15:34 +01:00
coverageinfo.rs Remove BackendTypes constraint from traits that don't need it. 2024-09-17 10:24:43 +10:00
debuginfo.rs Remove get_dbg_loc from DebugInfoBuilderMethods 2025-06-03 10:00:11 +00:00
declare.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
intrinsic.rs Remove type_test from IntrinsicCallBuilderMethods 2025-06-03 10:00:56 +00:00
misc.rs The personality function is a Function, not a Value 2025-05-28 20:55:00 +00:00
mod.rs Reduce amount of types that need to be PartialEq 2025-05-28 20:55:00 +00:00
statics.rs Remove methods from StaticCodegenMethods that are not called in cg_ssa itself 2025-05-28 20:55:00 +00:00
type_.rs Rollup merge of #142383 - scottmcm:operandref-builder, r=workingjubilee 2025-06-18 18:06:50 +02:00
write.rs Mark all optimize methods and the codegen method as safe 2025-05-28 20:55:00 +00:00