[Attributor] Allow PHI nodes in AAValueConstantRangeFloating
authorJohannes Doerfert <johannes@jdoerfert.de>
Mon, 10 Feb 2020 02:14:35 +0000 (20:14 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Mon, 10 Feb 2020 06:55:10 +0000 (00:55 -0600)
commit8155439331ac8f85be54adbd053c100567927d7c
tree408cfb9df8622b6545fbe3dd6b27f0b7f7003f30
parent63adbb9a0ed9a40fc47c72502754d88d04ede1e0
[Attributor] Allow PHI nodes in AAValueConstantRangeFloating

Traversing PHI nodes is natural with the genericValueTraversal but also
a bit tricky. The problem is similar to the ones we have seen in AAAlign
and AADereferenceable, namely that we continue to increase the range in
each iteration. We use a pessimistic approach here to stop the
iterations. Nevertheless, optimistic information can now be propagated
through a PHI node.
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/liveness.ll
llvm/test/Transforms/Attributor/range.ll
llvm/test/Transforms/Attributor/willreturn.ll