[Attributor] Allow multiple uses of a casted function pointer
authorJohannes Doerfert <johannes@jdoerfert.de>
Sun, 26 Jan 2020 02:24:38 +0000 (20:24 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 20 Feb 2020 02:43:38 +0000 (20:43 -0600)
commitc6ac717aa70d3f31c0a4fd6385e8baaa9f3e2724
treeaa7da09f3f9854984a67199b688b41da30b16d87
parent6730f390a1fb069e567ebd635390de381d21b994
[Attributor] Allow multiple uses of a casted function pointer

If a function pointer is casted into a different type the resulting
expression can be a constant. If so, it can be used multiple times which
cannot be handled by the AbstractCallSite constructor alone. Instead, we
follow the cast expression uses now explicitly during the call site
traversal.
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/IPConstantProp/arg-count-mismatch.ll
llvm/test/Transforms/Attributor/IPConstantProp/arg-type-mismatch.ll
llvm/test/Transforms/Attributor/callbacks.ll