diff options
| author | Igor Laevsky <igmyrj@gmail.com> | 2015-07-11 10:30:36 +0000 |
|---|---|---|
| committer | Igor Laevsky <igmyrj@gmail.com> | 2015-07-11 10:30:36 +0000 |
| commit | 39d662f7ba0aa80799a2c6ea2ca84b0c0727db66 (patch) | |
| tree | 1486500f54fd10e5c5b7b147dffcaf5a7c6b9bac /llvm/docs | |
| parent | 15f5d9731123d31af0baf935fbcc07a001d11ebd (diff) | |
| download | bcm5719-llvm-39d662f7ba0aa80799a2c6ea2ca84b0c0727db66.tar.gz bcm5719-llvm-39d662f7ba0aa80799a2c6ea2ca84b0c0727db66.zip | |
Add argmemonly attribute.
This change adds new attribute called "argmemonly". Function marked with this attribute can only access memory through it's argument pointers. This attribute directly corresponds to the "OnlyAccessesArgumentPointees" ModRef behaviour in alias analysis.
Differential Revision: http://reviews.llvm.org/D10398
llvm-svn: 241979
Diffstat (limited to 'llvm/docs')
| -rw-r--r-- | llvm/docs/LangRef.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index a28ad104f13..48771c211c1 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1326,6 +1326,14 @@ example: On an argument, this attribute indicates that the function does not write through this pointer argument, even though it may write to the memory that the pointer points to. +``argmemonly`` + This attribute indicates that the only memory accesses inside function are + loads and stores from objects pointed to by its pointer-typed arguments, + with arbitrary offsets. Or in other words, all memory operations in the + function can refer to memory only using pointers based on its function + arguments. + Note that ``argmemonly`` can be used together with ``readonly`` attribute + in order to specify that function reads only from its arguments. ``returns_twice`` This attribute indicates that this function can return twice. The C ``setjmp`` is an example of such a function. The compiler disables |

