aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorStephen Lin <stephenwlin@gmail.com>2013-04-20 05:14:40 +0000
committerStephen Lin <stephenwlin@gmail.com>2013-04-20 05:14:40 +0000
commit456ca048af35163b9f52187e92a23ee0a9f059e8 (patch)
treef7b4d4711424b927d5b323a9e4ef4d97742beeb4 /docs
parent5c34e08b9fff9d4df2421e4f41ff15b85f638dd1 (diff)
Add CodeGen support for functions that always return arguments via a new parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 905053fef0..7dafbb9877 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -719,7 +719,17 @@ Currently, only the following parameter attributes are defined:
``nest``
This indicates that the pointer parameter can be excised using the
:ref:`trampoline intrinsics <int_trampoline>`. This is not a valid
- attribute for return values.
+ attribute for return values and can only be applied to one parameter.
+
+``returned``
+ This indicates that the value of the function always returns the value
+ of the parameter 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.
.. _gc: