1
Fork 0
rust/compiler/rustc_codegen_llvm/src
bors a6d93acf5f Auto merge of #122050 - erikdesjardins:sret, r=nikic
Stop using LLVM struct types for byval/sret

For `byval` and `sret`, the type has no semantic meaning, only the size matters\*†. Using `[N x i8]` is a more direct way to specify that we want `N` bytes, and avoids relying on LLVM's struct layout.

\*: The alignment would matter, if we didn't explicitly specify it. From what I can tell, we always specified the alignment for `sret`; for `byval`, we didn't until #112157.

†: For `byval`, the hidden copy may be impacted by padding in the LLVM struct type, i.e. padding bytes may not be copied. (I'm not sure if this is done today, but I think it would be legal.) But we manually pad our LLVM struct types specifically to avoid there ever being LLVM-visible padding, so that shouldn't be an issue.

Split out from #121577.

r? `@nikic`
2024-03-11 04:45:27 +00:00
..
back Add arm64ec-pc-windows-msvc target 2024-03-06 17:49:37 -08:00
coverageinfo avoid collecting into vecs in some places 2024-03-02 14:18:47 +01:00
debuginfo only set noalias on Box with the global allocator 2024-03-05 15:03:33 +01:00
llvm Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
abi.rs use [N x i8] for byval/sret types 2024-03-05 18:54:45 -05:00
allocator.rs Add -Zuse-sync-unwind 2023-12-31 15:27:43 +08:00
asm.rs Add assertions and clarify asm-goto with noreturn 2024-02-24 19:49:16 +00:00
attributes.rs is_closure_like 2024-02-11 22:09:52 +00:00
base.rs compiler: replace cstr macro with c str literals in compiler and few other c str replacements 2023-12-03 14:54:09 +03:00
builder.rs Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
callee.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
common.rs ctfe interpreter: extend provenance so that it can track whether a pointer is immutable 2023-12-07 17:46:36 +01:00
consts.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
context.rs use Instance::expect_resolve() instead of unwraping Instance::resolve() 2024-03-10 11:49:33 +01:00
declare.rs Add unstable -Zdefault-hidden-visibility cmdline flag for rustc. 2023-12-13 21:14:23 +00:00
errors.rs Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
intrinsic.rs Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
lib.rs compiler: use addr_of! 2024-02-24 18:53:48 +03:00
llvm_util.rs Add arm64ec-pc-windows-msvc target 2024-03-06 17:49:37 -08:00
mono_item.rs Add unstable -Z direct-access-external-data cmdline flag for rustc 2024-01-16 19:15:06 +08:00
type_.rs Auto merge of #121665 - erikdesjardins:ptradd, r=nikic 2024-03-03 22:21:53 +00:00
type_of.rs Auto merge of #121665 - erikdesjardins:ptradd, r=nikic 2024-03-03 22:21:53 +00:00
va_arg.rs Add arm64ec-pc-windows-msvc target 2024-03-06 17:49:37 -08:00
value.rs