[FunctionAttrs] Handle potential access of captured argument
authorNikita Popov <npopov@redhat.com>
Thu, 13 Oct 2022 09:13:30 +0000 (11:13 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 13 Oct 2022 09:15:36 +0000 (11:15 +0200)
commit440ce05fbf869040b41a5fc9953d7b11ad5bb776
tree660cf310227ee0de1548aad08c285c137f8e08cf
parent7ac10e5b347f3e22ae1dad5937de667e57c472be
[FunctionAttrs] Handle potential access of captured argument

We have to account for accesses to argument memory via captures.
I don't think there's any way to make this produce incorrect
results right now (because as soon as "other" is set, we lose the
ability to infer argmemonly), but this avoids incorrect results
once we have more precise representation.
llvm/lib/Transforms/IPO/FunctionAttrs.cpp