diff options
author | Stephen Lin <stephenwlin@gmail.com> | 2013-04-20 05:14:40 +0000 |
---|---|---|
committer | Stephen Lin <stephenwlin@gmail.com> | 2013-04-20 05:14:40 +0000 |
commit | b8bd232a3da38b11bb0b848ad2bd18d57319b9dc (patch) | |
tree | 89851559c908e128175716113c7d2205bc44d09b /llvm/docs | |
parent | ffc445492cb7b3a78b042e32f956a4438aeda2c9 (diff) | |
download | bcm5719-llvm-b8bd232a3da38b11bb0b848ad2bd18d57319b9dc.tar.gz bcm5719-llvm-b8bd232a3da38b11bb0b848ad2bd18d57319b9dc.zip |
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).
llvm-svn: 179925
Diffstat (limited to 'llvm/docs')
-rw-r--r-- | llvm/docs/LangRef.rst | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 905053fef0b..7dafbb98779 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/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: |