[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

2024-01-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/77116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

2024-01-10 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. https://github.com/llvm/llvm-project/pull/77116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

2024-01-10 Thread John McCall via cfe-commits
rjmccall wrote: If I understand the specification of these attributes correctly, they seem fine. `dead_on_unwind` is definitely fine — the return value must be treated as uninitialized after a call that throws. `writable` has a somewhat loose specification that scares me a bit, but as long

[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

2024-01-10 Thread Nikita Popov via cfe-commits
nikic wrote: Some IR for reference: https://clang.godbolt.org/z/qEsP7vozW I believe that on unwind, the sret temporary is either entirely unused (if no cleanup landingpad is necessary) or we will call lifetime.end on it (which is legal for dead_on_unwind). This should be independent of

[clang] [Clang] Set writable and dead_on_unwind attributes on sret arguments (PR #77116)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Nikita Popov (nikic) Changes Set the writable and dead_on_unwind attributes for sret arguments. These indicate that the argument points to writable memory (and it's legal to introduce spurious writes to