[Attributor][FIX] Handle function pointers properly in AANonNull
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 18 Aug 2020 00:54:42 +0000 (19:54 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 18 Aug 2020 04:36:35 +0000 (23:36 -0500)
commitb27bdf955a74e1050645ef5482498a834e9dfc1e
tree2b5850a8ff7f5f569c63f5cd88842dbc48754af4
parent00d7b7d014f90aaaacaef6f9c778614b09356bf0
[Attributor][FIX] Handle function pointers properly in AANonNull

Before we tired to create a dominator tree for a declaration when we
wanted to determine if the function pointer is `nonnull`. We now avoid
looking at global values if `Value::getPointerDereferenceableBytes` not
already determined `nonnull`.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
llvm/test/Transforms/Attributor/callbacks.ll
llvm/test/Transforms/Attributor/liveness.ll
llvm/test/Transforms/Attributor/misc.ll
llvm/test/Transforms/Attributor/nonnull.ll