diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-02-24 13:46:15 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-02-24 13:46:15 +0000 |
| commit | c523dcff2920943f5f65d5d94c9cc7ea060083bf (patch) | |
| tree | 1cf58d753bbc9b1915ac5cf00a5deefc0a1da2b9 /clang | |
| parent | f72bdb47bc79b57edefb62369e41d06b823dc768 (diff) | |
| download | bcm5719-llvm-c523dcff2920943f5f65d5d94c9cc7ea060083bf.tar.gz bcm5719-llvm-c523dcff2920943f5f65d5d94c9cc7ea060083bf.zip | |
Clarifying the wording for the noduplicate attribute.
Patch by Marcello Maggioni!
llvm-svn: 202035
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/docs/AttributeReference.rst | 18 | ||||
| -rw-r--r-- | clang/include/clang/Basic/AttrDocs.td | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/clang/docs/AttributeReference.rst b/clang/docs/AttributeReference.rst index 1f3af06ae36..c488eeac91a 100644 --- a/clang/docs/AttributeReference.rst +++ b/clang/docs/AttributeReference.rst @@ -385,13 +385,12 @@ noduplicate (clang::noduplicate) "X","X","",""
The ``noduplicate`` attribute can be placed on function declarations to control
-whether function calls to this function can be duplicated
-or not as a result of optimizations. This is required for the implementation
-of functions with certain special requirements, like the OpenCL "barrier",
-function that, depending on the hardware, might require to be run concurrently
-by all the threads that are currently executing in lockstep on the hardware.
-For example this attribute applied on the function "nodupfunc"
-avoids that this code:
+whether function calls to this function can be duplicated or not as a result of
+optimizations. This is required for the implementation of functions with
+certain special requirements, like the OpenCL "barrier" function, that might
+need to be run concurrently by all the threads that are executing in lockstep
+on the hardware. For example this attribute applied on the function
+"nodupfunc" in the code below avoids that:
.. code-block:: c
@@ -408,7 +407,7 @@ avoids that this code: bar();
}
-gets possibly modified by some optimization into code similar to this:
+gets possibly modified by some optimizations into code similar to this:
.. code-block:: c
@@ -420,7 +419,8 @@ gets possibly modified by some optimization into code similar to this: bar();
}
-where the barrier call is duplicated and sunk into the two branches of the condition.
+where the call to "nodupfunc" is duplicated and sunk into the two branches
+of the condition.
no_sanitize_address (no_address_safety_analysis, gnu::no_address_safety_analysis, gnu::no_sanitize_address)
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 1e67db09706..173242aeb18 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -307,13 +307,12 @@ def NoDuplicateDocs : Documentation { let Category = DocCatFunction; let Content = [{ The ``noduplicate`` attribute can be placed on function declarations to control -whether function calls to this function can be duplicated -or not as a result of optimizations. This is required for the implementation -of functions with certain special requirements, like the OpenCL "barrier", -function that, depending on the hardware, might require to be run concurrently -by all the threads that are currently executing in lockstep on the hardware. -For example this attribute applied on the function "nodupfunc" -avoids that this code: +whether function calls to this function can be duplicated or not as a result of +optimizations. This is required for the implementation of functions with +certain special requirements, like the OpenCL "barrier" function, that might +need to be run concurrently by all the threads that are executing in lockstep +on the hardware. For example this attribute applied on the function +"nodupfunc" in the code below avoids that: .. code-block:: c @@ -330,7 +329,7 @@ avoids that this code: bar(); } -gets possibly modified by some optimization into code similar to this: +gets possibly modified by some optimizations into code similar to this: .. code-block:: c @@ -342,7 +341,8 @@ gets possibly modified by some optimization into code similar to this: bar(); } -where the barrier call is duplicated and sunk into the two branches of the condition. +where the call to "nodupfunc" is duplicated and sunk into the two branches +of the condition. }]; } |

