[Attributor] Move recursion reasoning into `AA::isPotentiallyReachable`
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 15 Mar 2022 17:34:04 +0000 (12:34 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 6 Apr 2022 01:49:03 +0000 (20:49 -0500)
commita8610d752306b48f914eb21108f2d1cb1fd6b710
treefd5e932ecd893a30dc63779a0db7ed2298b61dd6
parentced9a795fd84aabfbc6a8b3040c33e719e39600c
[Attributor] Move recursion reasoning into `AA::isPotentiallyReachable`

With D106397 we ensured that `AAReachability` will not answer queries for
potentially recursive functions. This was necessary as we did not treat
recursion explicitly otherwise. Now that we have
`AA::isPotentiallyReachable` we can make `AAReachability` a purely
intra-procedural AA which does not care about recursion.
`AA::isPotentiallyReachable`, however, does already deal with "going
back" the call graph and can now do so for potentially recursive
functions.
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp