[attrs] Handle convergent CallSites.
authorJustin Lebar <jlebar@google.com>
Mon, 22 Feb 2016 17:51:35 +0000 (17:51 +0000)
committerJustin Lebar <jlebar@google.com>
Mon, 22 Feb 2016 17:51:35 +0000 (17:51 +0000)
commit7bf9187abbdbe5c789528bc4961a56baed2eb303
tree8c176fadbfe52f6d854c4edb03fc9dfa8112164e
parentf62b165a0403434999cf77e265ce3dafce8dddcc
[attrs] Handle convergent CallSites.

Summary:
Previously we had a notion of convergent functions but not of convergent
calls.  This is insufficient to correctly analyze calls where the target
is unknown, e.g. indirect calls.

Now a call is convergent if it targets a known-convergent function, or
if it's explicitly marked as convergent.  As usual, we can remove
convergent where we can prove that no convergent operations are
performed in the call.

Reviewers: chandlerc, jingyue

Subscribers: hfinkel, jhen, tra, llvm-commits

Differential Revision: http://reviews.llvm.org/D17317

llvm-svn: 261544
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/FunctionAttrs/convergent.ll
llvm/test/Transforms/InstCombine/convergent.ll [new file with mode: 0644]