[PATCH] D104007: [BasicAA] Properly mark that coroutine suspension may modify parameters

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 13:27:44 PDT 2021


efriedma added a comment.

In D104007#2813714 <https://reviews.llvm.org/D104007#2813714>, @efriedma wrote:

>> Do you know if there is a stable contract in IR to tell whether an argument is in fact a callee-owned memory?
>
> Argument::hasPassPointeeByValueCopyAttr()

Sorry, that's not right.  The question you want to answer here is whether the pointer in the caller points to different memory from the pointer in the callee.  The only attribute that causes that is byval, and it's very unlikely we'll ever add any others.

inalloca/preallocated memory is part of the callee stack frame, at a low level.  But it's actually allocated in the caller, so from an alias-analysis perspective, it doesn't count as a local allocation like byval would.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104007/new/

https://reviews.llvm.org/D104007



More information about the llvm-commits mailing list