[Attributor] Use checkForAllUses instead of custom use tracking
authorJohannes Doerfert <johannes@jdoerfert.de>
Wed, 14 Jul 2021 03:50:57 +0000 (22:50 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 20 Jul 2021 06:39:33 +0000 (01:39 -0500)
commit5eba7846a5cb3777bf1178da5bbd86f117157d98
tree2011a07b4c5728e43425b6dcb8a4d4f3ff482730
parent3f981fc1861a0683eb00b442d4cad7410d4a8e59
[Attributor] Use checkForAllUses instead of custom use tracking

AAMemoryBehaviorFloating used a custom use tracking mechanism even
though checkForAllUses exists and is already more powerful. Further,
AAMemoryBehaviorFloating uses AANoCapture to guarantee that there are no
aliases and following the uses is sufficient. This is an OK assumption
if checkForAllUses is used but custom tracking is easily out of sync
with AANoCapture and problems follow.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/depgraph.ll
llvm/test/Transforms/Attributor/heap_to_stack.ll