OSDN Git Service

Let FuncAttrs infer the 'returned' argument attribute
authorHal Finkel <hfinkel@anl.gov>
Sun, 10 Jul 2016 22:02:55 +0000 (22:02 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 10 Jul 2016 22:02:55 +0000 (22:02 +0000)
commit772d8502adb73de6cd0fb0320cd3da48e86b4c04
treec4df7cfe9582a31a3c486570e52eabc8e796cadc
parentba7f24f16f97d9b6c9093d8ff91c33cbffb1c75f
Let FuncAttrs infer the 'returned' argument attribute

A function can have one argument with the 'returned' attribute, indicating that
the associated argument is always the return value of the function. Add
FuncAttrs inference logic.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275027 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/FunctionAttrs.cpp
test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll
test/Transforms/FunctionAttrs/nocapture.ll
test/Transforms/FunctionAttrs/readattrs.ll