diff options
author | Hal Finkel <hfinkel@anl.gov> | 2016-07-10 21:52:39 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2016-07-10 21:52:39 +0000 |
commit | ba7f24f16f97d9b6c9093d8ff91c33cbffb1c75f (patch) | |
tree | 0d54285fb18694d51af8822d3138394c3241b4f0 | |
parent | 03c714d84ace27cabae64082578dc1c43f300656 (diff) |
Update the LangRef description of the 'returned' attribute
The description of the 'returned' attribute says that it is only used when
code-generating the caller. I'd like to make the optimizer smarter about
looking through functions with returned arguments (generally, but motivated by
my llvm.noalias work). As David pointed out in the review of D22202, the
LangRef should be updated to make its expanded uses clearer.
Differential Revision: http://reviews.llvm.org/D22205
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275026 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/LangRef.rst | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 699f56c2d62..f886a4a0f16 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -1060,12 +1060,13 @@ Currently, only the following parameter attributes are defined: ``returned`` This indicates that the function always returns the argument as its return - value. This is an optimization hint to the code generator when generating - the caller, allowing tail call optimization and omission of register saves - and restores in some cases; it is not checked or enforced when generating - the callee. The parameter and the function return type must be valid - operands for the :ref:`bitcast instruction <i_bitcast>`. This is not a - valid attribute for return values and can only be applied to one parameter. + value. This is a hint to the optimizer and code generator used when + generating the caller, allowing value propagation, tail call optimization, + and omission of register saves and restores in some cases; it is not + checked or enforced when generating the callee. The parameter and the + function return type must be valid operands for the + :ref:`bitcast instruction <i_bitcast>`. This is not a valid attribute for + return values and can only be applied to one parameter. ``nonnull`` This indicates that the parameter or return pointer is not null. This |