[llvm] r280951 - Remove restriction that 'sret' must be on the first parameter

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 08:45:27 PDT 2016


Author: rnk
Date: Thu Sep  8 10:45:27 2016
New Revision: 280951

URL: http://llvm.org/viewvc/llvm-project?rev=280951&view=rev
Log:
Remove restriction that 'sret' must be on the first parameter

On Windows, it is often applied to the second parameter, and the x86
backend is prepared to deal with sret appearing on any parameter.

Other backends assume it only appears on parameter zero, but those are
target-specific requirements, and not an IR-level rule.

Modified:
    llvm/trunk/docs/LangRef.rst

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=280951&r1=280950&r2=280951&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Thu Sep  8 10:45:27 2016
@@ -1029,10 +1029,9 @@ Currently, only the following parameter
     This indicates that the pointer parameter specifies the address of a
     structure that is the return value of the function in the source
     program. This pointer must be guaranteed by the caller to be valid:
-    loads and stores to the structure may be assumed by the callee
-    not to trap and to be properly aligned. This may only be applied to
-    the first parameter. This is not a valid attribute for return
-    values.
+    loads and stores to the structure may be assumed by the callee not
+    to trap and to be properly aligned. This is not a valid attribute
+    for return values.
 
 ``align <n>``
     This indicates that the pointer value may be assumed by the optimizer to




More information about the llvm-commits mailing list