[Attributor] Remove capture tracker usage and follow uses explicitly
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 8 Mar 2022 21:49:26 +0000 (15:49 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Sat, 12 Mar 2022 04:56:16 +0000 (22:56 -0600)
commit85daf6973d2bd3216b9d131be5be625b1227016c
treefa53c3e110a8d67d2b94c0fd6420a9040f9a54f7
parentd6e09ce86fd9c8907301d150d2d2dc7166355955
[Attributor] Remove capture tracker usage and follow uses explicitly

Before we used the capture tracker to follow pointer uses, now we do it
explicitly ourselves through the Attributor API. There are multiple
benefits: For one, the boilerplate is cut down by a lot. The class,
potential copies vector, etc. is all not needed anymore. We also do
avoid explicitly looking through memory here, something that was
duplicated and should only live in the `checkForAllUses~ helper. More
importantly, as we do simplifications we need to make sure all parties
are in sync when they reason about uses. The old way did not allow us to
do this but the new one does as every use visiting AA goes through
`checkForAllUses` now..
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/depgraph.ll
llvm/test/Transforms/Attributor/dereferenceable-1.ll