[PATCH] D10398: Add read_write_arg_mem attribute
hfinkel at anl.gov
hfinkel at anl.gov
Wed Jul 8 19:27:48 PDT 2015
hfinkel added inline comments.
================
Comment at: docs/LangRef.rst:1328
@@ +1327,3 @@
+``argmemonly``
+ This attribute indicates that the only memory acesses inside function are
+ non-volatile loads and stores from objects pointed to by its pointer-typed
----------------
acesses -> accesses
================
Comment at: docs/LangRef.rst:1329
@@ +1328,3 @@
+ This attribute indicates that the only memory acesses inside function are
+ non-volatile loads and stores from objects pointed to by its pointer-typed
+ arguments, with arbitrary offsets. Or in other words, all memory operations
----------------
Also non-atomic?
================
Comment at: docs/LangRef.rst:1331
@@ +1330,3 @@
+ arguments, with arbitrary offsets. Or in other words, all memory operations
+ in the function can refer to memory only using pointers based on this
+ function arguments.
----------------
this -> its
================
Comment at: docs/LangRef.rst:1334
@@ -1327,1 +1333,3 @@
+ Note that ``argmemonly`` can be used together with ``readonly`` attribute
+ in order to specify that function reads only from it's arguments.
``returns_twice``
----------------
it's -> its
================
Comment at: include/llvm/IR/Attributes.h:102
@@ -101,1 +101,3 @@
+ ArgMemOnly, ///< Funciton can access memory only using pointers
+ ///< passed in as arguments.
Returned, ///< Return value is always equal to this argument
----------------
passed in as -> based on its
================
Comment at: include/llvm/IR/CallSite.h:293
@@ -292,1 +292,3 @@
+ /// @brief Determine if the call access memmory only using it's pointer
+ /// arguments.
----------------
using it's -> based on its
================
Comment at: include/llvm/IR/CallSite.h:295
@@ +294,3 @@
+ /// arguments.
+ bool accessOnlyArgMemory() const {
+ CALLSITE_DELEGATE_GETTER(accessOnlyArgMemory());
----------------
For grammatical consistency, we should name this:
onlyAccessesArgMemory
and the same goes for the other functions below.
================
Comment at: include/llvm/IR/Function.h:296
@@ -295,1 +295,3 @@
+ /// @brief Determine if the call access memmory only using it's pointer
+ /// arguments.
----------------
using it's -> based on its
================
Comment at: include/llvm/IR/Instructions.h:1585
@@ -1584,1 +1584,3 @@
+ /// @brief Determine if the call access memmory only using it's pointer
+ /// arguments.
----------------
using it's -> based on its
================
Comment at: include/llvm/IR/Instructions.h:3356
@@ -3346,1 +3355,3 @@
+ /// @brief Determine if the call access memmory only using it's pointer
+ /// arguments.
----------------
using it's -> based on its
================
Comment at: lib/AsmParser/LLParser.cpp:978
@@ -976,3 +977,3 @@
case lltok::kw_sanitize_memory: B.addAttribute(Attribute::SanitizeMemory); break;
case lltok::kw_uwtable: B.addAttribute(Attribute::UWTable); break;
----------------
We treat the 80 column limit as strict. You'll need to reformat these in some other way.
http://reviews.llvm.org/D10398
More information about the llvm-commits
mailing list