]> granicus.if.org Git - clang/commitdiff
Clarifying the wording for the noduplicate attribute.
authorAaron Ballman <aaron@aaronballman.com>
Mon, 24 Feb 2014 13:46:15 +0000 (13:46 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 24 Feb 2014 13:46:15 +0000 (13:46 +0000)
Patch by Marcello Maggioni!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202035 91177308-0d34-0410-b5e6-96231b3b80d8

docs/AttributeReference.rst
include/clang/Basic/AttrDocs.td

index 1f3af06ae36a14158778449d2e7d24066612df26..c488eeac91ab3ff6cad6a5923a04b5b897523807 100644 (file)
@@ -385,13 +385,12 @@ noduplicate (clang::noduplicate)
    "X","X","",""\r
 \r
 The ``noduplicate`` attribute can be placed on function declarations to control\r
-whether function calls to this function can be duplicated \r
-or not as a result of optimizations. This is required for the implementation\r
-of functions with certain special requirements, like the OpenCL "barrier", \r
-function that, depending on the hardware, might require to be run concurrently\r
-by all the threads that are currently executing in lockstep on the hardware.\r
-For example this attribute applied on the function "nodupfunc" \r
-avoids that this code:\r
+whether function calls to this function can be duplicated or not as a result of\r
+optimizations. This is required for the implementation of functions with\r
+certain special requirements, like the OpenCL "barrier" function, that might\r
+need to be run concurrently by all the threads that are executing in lockstep\r
+on the hardware. For example this attribute applied on the function\r
+"nodupfunc" in the code below avoids that:\r
 \r
 .. code-block:: c\r
 \r
@@ -408,7 +407,7 @@ avoids that this code:
     bar();\r
   }\r
 \r
-gets possibly modified by some optimization into code similar to this:\r
+gets possibly modified by some optimizations into code similar to this:\r
 \r
 .. code-block:: c\r
 \r
@@ -420,7 +419,8 @@ gets possibly modified by some optimization into code similar to this:
     bar();\r
   }\r
 \r
-where the barrier call is duplicated and sunk into the two branches of the condition.\r
+where the call to "nodupfunc" is duplicated and sunk into the two branches\r
+of the condition.\r
 \r
 \r
 no_sanitize_address (no_address_safety_analysis, gnu::no_address_safety_analysis, gnu::no_sanitize_address)\r
index 1e67db09706b20182ba1019a07940f33b82237dd..173242aeb185ece0789b80017753d31633f5ae8f 100644 (file)
@@ -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.
   }];
 }