[Attributor][NFCI] Avoid spending time resolving kernel reachability queries
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 2 Feb 2023 21:05:20 +0000 (13:05 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 2 Feb 2023 21:59:58 +0000 (13:59 -0800)
commit63b02271a8916c8ed8ce240ac5823825329755a6
tree2425b758bba802615810be0168c5c3bd4952d06c
parentc4ad24deeed8165f1c636473459982b8d9570e74
[Attributor][NFCI] Avoid spending time resolving kernel reachability queries

We know kernels (generally) cannot be called from within the module. Thus,
for reachability we would need to step back from a kernel which would allow
us to reach anything anyway. Even if a kernel is invoked from another
kernel, values like allocas and shared memory are not accessible. We
implicitly check for this situation to avoid costly lookups.
llvm/lib/Transforms/IPO/Attributor.cpp