mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Note the relationship between C99 restrict and LLVM noalias, and
clarify a few other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
36335be3b9
commit
ff70fe40aa
@ -64,7 +64,8 @@
|
|||||||
|
|
||||||
<div class="doc_text">
|
<div class="doc_text">
|
||||||
<p>This document seeks to dispel the mystery and confusion surrounding LLVM's
|
<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
|
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
|
coding with LLVM. Here we lay out the sources of confusion and show that the
|
||||||
GEP instruction is really quite simple.
|
GEP instruction is really quite simple.
|
||||||
@ -653,7 +654,8 @@ idx3 = (char*) &MyVar + 8
|
|||||||
<li>Support C, C-like languages, and languages which can be
|
<li>Support C, C-like languages, and languages which can be
|
||||||
conceptually lowered into C (this covers a lot).</li>
|
conceptually lowered into C (this covers a lot).</li>
|
||||||
<li>Support optimizations such as those that are common in
|
<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
|
<li>Provide a consistent method for computing addresses so that
|
||||||
address computations don't need to be a part of load and
|
address computations don't need to be a part of load and
|
||||||
store instructions in the IR.</li>
|
store instructions in the IR.</li>
|
||||||
|
@ -1062,7 +1062,15 @@ declare signext i8 @returns_signed_char()
|
|||||||
The caller shares the responsibility with the callee for ensuring that
|
The caller shares the responsibility with the callee for ensuring that
|
||||||
these requirements are met.
|
these requirements are met.
|
||||||
For further details, please see the discussion of the NoAlias response in
|
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>
|
<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
|
<dd>This indicates that the callee does not make any copies of the pointer
|
||||||
@ -2397,7 +2405,8 @@ has undefined behavior.</p>
|
|||||||
|
|
||||||
<li>An instruction with externally visible side effects depends on the most
|
<li>An instruction with externally visible side effects depends on the most
|
||||||
recent preceding instruction with externally visible side effects, following
|
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
|
<li>An instruction <i>control-depends</i> on a
|
||||||
<a href="#terminators">terminator instruction</a>
|
<a href="#terminators">terminator instruction</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user