diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-28 18:04:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-28 18:04:31 +0200 |
| commit | 713c852a2f46da2a298e1e67bc15d5fef58c6ee9 (patch) | |
| tree | 154ce35ef200027797671589a7767dfe35bd058f /compiler/rustc_lint/src/errors.rs | |
| parent | 7717a306b2678ba9ece19b723c76a6b3a89ba931 (diff) | |
| parent | ead02ba0f14f8d54c3c05d8382d317d9b320072a (diff) | |
| download | rust-713c852a2f46da2a298e1e67bc15d5fef58c6ee9.tar.gz rust-713c852a2f46da2a298e1e67bc15d5fef58c6ee9.zip | |
Rollup merge of #117671 - kjetilkjeka:nvptx_c_abi_avoid_direct, r=davidtwco
NVPTX: Avoid PassMode::Direct for args in C abi Fixes #117480 I must admit that I'm confused about `PassMode` altogether, is there a good sum-up threads for this anywhere? I'm especially confused about how "indirect" and "byval" goes together. To me it seems like "indirect" basically means "use a indirection through a pointer", while "byval" basically means "do not use indirection through a pointer". The return used to keep `PassMode::Direct` for small aggregates. It turns out that `make_indirect` messes up the tests and one way to fix it is to keep `PassMode::Direct` for all aggregates. I have mostly seen this PassMode mentioned for args. Is it also a problem for returns? When experimenting with `byval` as an alternative i ran into [this assert](https://github.com/rust-lang/rust/blob/61a3eea8043cc1c7a09c2adda884e27ffa8a1172/compiler/rustc_codegen_llvm/src/abi.rs#L463C22-L463C22) I have added tests for the same kind of types that is already tested for the "ptx-kernel" abi. The tests cannot be enabled until something like #117458 is completed and merged. CC: ``@RalfJung`` since you seem to be the expert on this and have already helped me out tremendously CC: ``@RDambrosio016`` in case this influence your work on `rustc_codegen_nvvm` ``@rustbot`` label +O-NVPTX
Diffstat (limited to 'compiler/rustc_lint/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
