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](
|
||
|---|---|---|
| .. | ||
| abi | ||
| asm | ||
| spec | ||
| json.rs | ||
| lib.rs | ||
| target_features.rs | ||
| tests.rs | ||