OSDN Git Service

[Attributor][FIX] Handle non-pointers when following uses
authorJohannes Doerfert <johannes@jdoerfert.de>
Fri, 10 Jan 2020 18:32:24 +0000 (12:32 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Fri, 24 Jan 2020 00:42:45 +0000 (18:42 -0600)
commitff6254dc2679d06174cb13ef5a79da1835461cd5
tree46fcd7209d8ab379cf64487e1566375fa85fd696
parent9dcf889d15dc28203a1e001c0a562920377b8337
[Attributor][FIX] Handle non-pointers when following uses

When we follow uses, e.g., in AAMemoryBehavior or AANoCapture, we need
to make sure the value is a pointer before we ask for abstract
attributes only valid for pointers. This happens because we follow
pointers through calls that do not capture but may return the value.
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/nocapture-1.ll
llvm/test/Transforms/Attributor/readattrs.ll