Skip to content

Commit

Permalink
Auto merge of #121298 - nikic:writable, r=cuviper
Browse files Browse the repository at this point in the history
Set writable and dead_on_unwind attributes for sret arguments

Set the `writable` and `dead_on_unwind` attributes for `sret` arguments. This allows call slot optimization to remove more memcpy's.

See https://llvm.org/docs/LangRef.html#parameter-attributes for the specification of these attributes. In short, the statement we're making here is that:

 * The return slot is writable.
 * The return slot will not be read if the function unwinds.

Fixes rust-lang/rust#90595.
  • Loading branch information
bors committed Apr 25, 2024
2 parents e27c5af + 26b5c02 commit 888971d
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 888971d

Please sign in to comment.