Document pure/const parameter attributes
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 14 Nov 2007 10:30:13 +0000 (10:30 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 14 Nov 2007 10:30:13 +0000 (10:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44111 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LangRef.html

index 46ec87eed267820ae843632f02452cb26b38b1c3..f40e8b67506064274aeacd86067322da8c7cc4f6 100644 (file)
@@ -813,6 +813,15 @@ a power of 2.</p>
     <dt><tt>nest</tt></dt>
     <dd>This indicates that the parameter can be excised using the
     <a href="#int_trampoline">trampoline intrinsics</a>.</dd>
+    <dt><tt>pure</tt></dt>
+    <dd>This function attribute indicates, that the function have no effects
+    except the return value and its return value depends only on the
+    arguments and/or global variables.</dd>
+    <dt><tt>const</tt></dt>
+    <dd>This function attribute is slightly more stricter version
+    of <tt>pure</tt> function attribute. <tt>const</tt> functions are not
+    allowed to read global memory, so such function only examines its arguments
+    and has no effects except return value.</dd>
   </dl>
 
 </div>