r202035 - Clarifying the wording for the noduplicate attribute.
Aaron Ballman
aaron at aaronballman.com
Mon Feb 24 05:46:15 PST 2014
Author: aaronballman
Date: Mon Feb 24 07:46:15 2014
New Revision: 202035
URL: http://llvm.org/viewvc/llvm-project?rev=202035&view=rev
Log:
Clarifying the wording for the noduplicate attribute.
Patch by Marcello Maggioni!
Modified:
cfe/trunk/docs/AttributeReference.rst
cfe/trunk/include/clang/Basic/AttrDocs.td
Modified: cfe/trunk/docs/AttributeReference.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AttributeReference.rst?rev=202035&r1=202034&r2=202035&view=diff
==============================================================================
--- cfe/trunk/docs/AttributeReference.rst (original)
+++ cfe/trunk/docs/AttributeReference.rst Mon Feb 24 07:46:15 2014
@@ -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 optimizat
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)
Modified: cfe/trunk/include/clang/Basic/AttrDocs.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=202035&r1=202034&r2=202035&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/AttrDocs.td (original)
+++ cfe/trunk/include/clang/Basic/AttrDocs.td Mon Feb 24 07:46:15 2014
@@ -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 optimizat
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.
}];
}
More information about the cfe-commits
mailing list