summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-03-05 18:26:34 +0000
committerReid Kleckner <reid@kleckner.net>2015-03-05 18:26:34 +0000
commit9f7c86141659e7637fb099bc41b1e015bbb42781 (patch)
tree6b5ca47d9a6d14e195785454fedc749c7146f35b /docs
parent8b4cc5e61610d58ca356beeff224efbe6d458bee (diff)
Replace llvm.frameallocate with llvm.frameescape
Turns out it's pretty straightforward and simplifies the implementation. Reviewers: andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D8051 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst24
1 files changed, 13 insertions, 11 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index cf6cc7e1dcd..218be344b6b 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -7614,7 +7614,7 @@ Note that calling this intrinsic does not prevent function inlining or
other aggressive transformations, so the value returned may not be that
of the obvious source-language caller.
-'``llvm.frameallocate``' and '``llvm.framerecover``' Intrinsics
+'``llvm.frameescape``' and '``llvm.framerecover``' Intrinsics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntax:
@@ -7622,24 +7622,23 @@ Syntax:
::
- declare i8* @llvm.frameallocate(i32 %size)
- declare i8* @llvm.framerecover(i8* %func, i8* %fp)
+ declare void @llvm.frameescape(...)
+ declare i8* @llvm.framerecover(i8* %func, i8* %fp, i32 %idx)
Overview:
"""""""""
-The '``llvm.frameallocate``' intrinsic allocates stack memory at some fixed
-offset from the frame pointer, and the '``llvm.framerecover``'
-intrinsic applies that offset to a live frame pointer to recover the address of
-the allocation. The offset is computed during frame layout of the caller of
-``llvm.frameallocate``.
+The '``llvm.frameescape``' intrinsic escapes offsets of a collection of static
+allocas, and the '``llvm.framerecover``' intrinsic applies those offsets to a
+live frame pointer to recover the address of the allocation. The offset is
+computed during frame layout of the caller of ``llvm.frameescape``.
Arguments:
""""""""""
-The ``size`` argument to '``llvm.frameallocate``' must be a constant integer
-indicating the amount of stack memory to allocate. As with allocas, allocating
-zero bytes is legal, but the result is undefined.
+All arguments to '``llvm.frameescape``' must be pointers to static allocas or
+casts of static allocas. Each function can only call '``llvm.frameescape``'
+once, and it can only do so from the entry block.
The ``func`` argument to '``llvm.framerecover``' must be a constant
bitcasted pointer to a function defined in the current module. The code
@@ -7651,6 +7650,9 @@ pointer of a call frame that is currently live. The return value of
'``llvm.frameaddress``' is one way to produce such a value, but most platforms
also expose the frame pointer through stack unwinding mechanisms.
+The ``idx`` argument to '``llvm.framerecover``' indicates which alloca passed to
+'``llvm.frameescape``' to recover. It is zero-indexed.
+
Semantics:
""""""""""