[Attributor][FIX] Properly check uses in the call not uses of the call
authorJohannes Doerfert <johannes@jdoerfert.de>
Sat, 10 Oct 2020 14:39:51 +0000 (09:39 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 28 Oct 2020 03:07:54 +0000 (22:07 -0500)
commit30e5a1f0be027b981e415e00691883bc52957976
treedf247a4565e0388c654339cb64c3bb9dfdb58998
parentcb813ab66a174396e90f92b65d74b4d813dd9c8d
[Attributor][FIX] Properly check uses in the call not uses of the call

In the AANoAlias logic we determine if a pointer may have been captured
before a call. We need to look at other uses in the call not uses of the
call.

The new code is not perfect as it does not allow trivial cases where the
call has multiple arguments but it is at least not unsound and a TODO
was added.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/memory_locations.ll
llvm/test/Transforms/Attributor/noalias.ll