]> granicus.if.org Git - llvm/commit
[Attributor] Use liveness during the creation of AAReturnedValues
authorJohannes Doerfert <jdoerfert@anl.gov>
Wed, 14 Aug 2019 21:29:37 +0000 (21:29 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Wed, 14 Aug 2019 21:29:37 +0000 (21:29 +0000)
commitbbf596a730eecdd8b19ffa244d4e408214b37002
tree6c310be4f38103565dfc7d59047f3924d0e8ae33
parentc5595c0ce31045189a2829e2ac109833f167b6e6
[Attributor] Use liveness during the creation of AAReturnedValues

Summary:
As one of the first attributes, and one of the complex ones,
AAReturnedValues was not using liveness but we filtered the result after
the fact. This change adds liveness usage during the creation. The
algorithm is also improved and shorter.

The new algorithm will collect returned values over time using the
generic facilities that work with liveness already, e.g.,
genericValueTraversal which does not look at dead PHI node predecessors.
A test to show how this leads to better results is included.

Note: Unresolved calls and resolved calls are now tracked explicitly.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66120

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368922 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/IPO/Attributor.h
lib/Transforms/IPO/Attributor.cpp
test/Transforms/FunctionAttrs/arg_returned.ll