[llvm-commits] [llvm] r107659 - in /llvm/trunk/docs: GetElementPtr.html LangRef.html
Dan Gohman
gohman at apple.com
Tue Jul 6 08:26:33 PDT 2010
Author: djg
Date: Tue Jul 6 10:26:33 2010
New Revision: 107659
URL: http://llvm.org/viewvc/llvm-project?rev=107659&view=rev
Log:
Note the relationship between C99 restrict and LLVM noalias, and
clarify a few other things.
Modified:
llvm/trunk/docs/GetElementPtr.html
llvm/trunk/docs/LangRef.html
Modified: llvm/trunk/docs/GetElementPtr.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GetElementPtr.html?rev=107659&r1=107658&r2=107659&view=diff
==============================================================================
--- llvm/trunk/docs/GetElementPtr.html (original)
+++ llvm/trunk/docs/GetElementPtr.html Tue Jul 6 10:26:33 2010
@@ -64,7 +64,8 @@
<div class="doc_text">
<p>This document seeks to dispel the mystery and confusion surrounding LLVM's
- GetElementPtr (GEP) instruction. Questions about the wily GEP instruction are
+ <a href="LangRef.html#i_getelementptr">GetElementPtr</a> (GEP) instruction.
+ Questions about the wily GEP instruction are
probably the most frequently occurring questions once a developer gets down to
coding with LLVM. Here we lay out the sources of confusion and show that the
GEP instruction is really quite simple.
@@ -653,7 +654,8 @@
<li>Support C, C-like languages, and languages which can be
conceptually lowered into C (this covers a lot).</li>
<li>Support optimizations such as those that are common in
- C compilers.</li>
+ C compilers. In particular, GEP is a cornerstone of LLVM's
+ <a href="LangRef.html#pointeraliasing">pointer aliasing model</a>.</li>
<li>Provide a consistent method for computing addresses so that
address computations don't need to be a part of load and
store instructions in the IR.</li>
Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=107659&r1=107658&r2=107659&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Tue Jul 6 10:26:33 2010
@@ -1062,7 +1062,15 @@
The caller shares the responsibility with the callee for ensuring that
these requirements are met.
For further details, please see the discussion of the NoAlias response in
- <a href="AliasAnalysis.html#MustMayNo">alias analysis</a>.</dd>
+ <a href="AliasAnalysis.html#MustMayNo">alias analysis</a>.<br>
+<br>
+ Note that this definition of <tt>noalias<tt> is intentionally
+ similar to the definition of <tt>restrict<tt> in C99 for function
+ arguments, thought it is slightly weaker.
+<br>
+ For function return values, C99's <tt>restrict</tt> is not meaningful,
+ while LLVM's <tt>noalias</tt> is.
+ </dd>
<dt><tt><b><a name="nocapture">nocapture</a></b></tt></dt>
<dd>This indicates that the callee does not make any copies of the pointer
@@ -2397,7 +2405,8 @@
<li>An instruction with externally visible side effects depends on the most
recent preceding instruction with externally visible side effects, following
- the order in the IR. (This includes volatile loads and stores.)</li>
+ the order in the IR. (This includes
+ <a href="#volatile">volatile operations</a>.)</li>
<li>An instruction <i>control-depends</i> on a
<a href="#terminators">terminator instruction</a>
More information about the llvm-commits
mailing list