-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce confusion about make_indirect_byval
by renaming it
#130450
Reduce confusion about make_indirect_byval
by renaming it
#130450
Conversation
I think adding wasm to other files in that directory as appropriate is what is supposed to happen. |
@bjorn3 What confuses me is that the other ABIss in transparent-struct-ptr seem to exhibit the pass-by-hidden-pointer ABI, but they also use the |
This comment has been minimized.
This comment has been minimized.
The way LLVM IR and Cranelift IR both work is that for byval you pass a pointer at the IR level, LLVM/Cranelift copies the value it points to to the right location and at the callee side a pointer to the right stack location is materialized out of thin air pretending to be a regular argument. This means the frontend can produce the exact ir (except for the byval attribute) whether large structs are passed using a pointer or at a fixed stack location. |
Ah. |
7e2cad3
to
30be609
Compare
After some mulling it over I split out that test for wasm. |
Thanks! @bors r+ |
…ect, r=bjorn3 Reduce confusion about `make_indirect_byval` by renaming it As part of doing so, remove the incorrect handling of the wasm target's `make_indirect_byval` (i.e. using it at all).
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
sigh, forgot to remove the actual wasm revision from the align-byval test, so it just had no directive, so tried to execute on the native... |
#130466 is landing a similar test diff for aarch64 so whatever, I'll just wait a bit. |
30be609
to
0278430
Compare
☔ The latest upstream changes (presumably #130500) made this pull request unmergeable. Please resolve the merge conflicts. |
This is ignored by LLVM, but is still incorrect.
The previous name is just an LLVMism, which conveys almost nothing about what is actually meant by the function relative to the ABI. In doing so, remove an already-addressed FIXME.
0278430
to
51718e8
Compare
…irect, r=bjorn3 Reduce confusion about `make_indirect_byval` by renaming it As part of doing so, remove the incorrect handling of the wasm target's `make_indirect_byval` (i.e. using it at all).
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#97524 (Add `Thread::{into_raw, from_raw}`) - rust-lang#127988 (Do not ICE with incorrect empty suggestion) - rust-lang#129422 (Gate `repr(Rust)` correctly on non-ADT items) - rust-lang#129934 (Win: Open dir for sync access in remove_dir_all) - rust-lang#130450 (Reduce confusion about `make_indirect_byval` by renaming it) - rust-lang#130476 (Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut`) - rust-lang#130487 (Update the minimum external LLVM to 18) - rust-lang#130513 (Clarify docs for std::fs::File::write) - rust-lang#130522 ([Clippy] Swap `manual_retain` to use diagnostic items instead of paths) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130450 - workingjubilee:these-names-are-indirect, r=bjorn3 Reduce confusion about `make_indirect_byval` by renaming it As part of doing so, remove the incorrect handling of the wasm target's `make_indirect_byval` (i.e. using it at all).
As part of doing so, remove the incorrect handling of the wasm target's
make_indirect_byval
(i.e. using it at all).Fixes #130442
r? @bjorn3
Advice requested: what to do about
tests/codegen/repr/transparent-struct-ptr.rs
? It seems incorrect to simply remove wasm from that one... does another test cover the relevant handling?