[llvm-commits] CVS: llvm/docs/BytecodeFormat.html LangRef.html

Anton Korobeynikov asl at math.spbu.ru
Wed Apr 25 07:28:00 PDT 2007



Changes in directory llvm/docs:

BytecodeFormat.html updated: 1.69 -> 1.70
LangRef.html updated: 1.237 -> 1.238
---
Log message:

Implement aliases. This fixes PR1017: http://llvm.org/PR1017  and it's dependent bugs. CFE part 
will follow.


---
Diffs of the changes:  (+91 -15)

 BytecodeFormat.html |   69 ++++++++++++++++++++++++++++++++++++++++++++++------
 LangRef.html        |   37 +++++++++++++++++++++------
 2 files changed, 91 insertions(+), 15 deletions(-)


Index: llvm/docs/BytecodeFormat.html
diff -u llvm/docs/BytecodeFormat.html:1.69 llvm/docs/BytecodeFormat.html:1.70
--- llvm/docs/BytecodeFormat.html:1.69	Sat Apr 21 03:16:24 2007
+++ llvm/docs/BytecodeFormat.html	Wed Apr 25 09:27:10 2007
@@ -943,11 +943,11 @@
         target triple specified, i.e. a platform-independent module).</td>
     </tr>
     <tr>
-	  <td><a href="#string">string</a></td>
-          <td class="td_left">The data layout string describing the endianness,
-            pointer size, and type alignments for which the module was written 
-            (blank means no data layout specified, i.e. a platform-independent 
-            module).</td>
+      <td><a href="#string">string</a></td>
+      <td class="td_left">The data layout string describing the endianness,
+        pointer size, and type alignments for which the module was written 
+        (blank means no data layout specified, i.e. a platform-independent 
+        module).</td>
     </tr>
     <tr>
       <td><a href="#llist">llist</a>(<a href="#string">string</a>)</td>
@@ -959,6 +959,11 @@
       <td><a href="#string">string</a></td>
       <td class="td_left">The inline asm block for this module.</td>
     </tr>
+    <tr>
+      <td><a href="#zlist">zlist</a>(<a href="#alias">alias</a>)</td>
+      <td class="td_left">A zero terminated list of aliases occurring in the
+      module.</td>
+    </tr>
   </tbody>
 </table>
 </div>
@@ -1123,7 +1128,7 @@
       <td><a href="#bit">bit(5-30)</a></td>
       <td class="td_left">Type slot number of type for the function.</td>
     </tr>
-                                      <tr>
+    <tr>
       <td><a href="#bit">bit(31)</a></td>
       <td class="td_left">Indicates whether an extension word follows.</td>
     </tr>
@@ -1186,6 +1191,56 @@
 </div>
 
 <!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"><a name="alias">Alias Field</a>
+</div>
+<div class="doc_text">
+<p>Aliases are written using 3 <a href="#uint32_vbr">uint32_vbr</a>
+that encode information about alias itself and aliasee.</p>
+
+<p>The table below provides the bit layout of
+the first <a href="#uint32_vbr">uint32_vbr</a> which describes alias itself.</p>
+
+<table>
+  <tbody>
+    <tr>
+      <th><b>Type</b></th>
+      <th class="td_left"><b>Description</b></th>
+    </tr>
+    <tr>
+      <td><a href="#bit">bit(0-1)</a></td>
+      <td class="td_left">Alias linkage. 0 - External linkage, 1 - Internal
+      linkage, 2 - Weak linkage.</td>
+    </tr>
+    <tr>
+      <td><a href="#bit">bit(2-31)</a></td>
+      <td class="td_left">Type slot number of type for the alias itself.</td>
+    </tr>
+  </tbody>
+</table>
+
+  <p>The next two <a href="#uint32_vbr">uint32_vbr's</a> describes the
+  aliasee. </p>
+
+<table>
+  <tbody>
+    <tr>
+      <th><b>Type</b></th>
+      <th class="td_left"><b>Description</b></th>
+    </tr>
+    <tr>
+      <td><a href="#uint32_vbr">uint32_vbr</a></td>
+      <td class="td_left">Type slot number of type for the aliasee.</td>
+    </tr>
+    <tr>
+      <td><a href="#uint32_vbr">uint32_vbr</a></td>
+      <td class="td_left">Slot number of the aliasee.</td>
+    </tr>
+  </tbody>
+</table>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
 <div class="doc_subsection"><a name="constantpool">Constant Pool</a> </div>
 <div class="doc_text">
 <p>A constant pool defines as set of constant values. There are
@@ -2097,7 +2152,7 @@
 <a href="mailto:rspencer at x10sys.com">Reid Spencer</a> and <a
  href="mailto:sabre at nondot.org">Chris Lattner</a><br>
 <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-Last modified: $Date: 2007/04/21 08:16:24 $
+Last modified: $Date: 2007/04/25 14:27:10 $
 </address>
 </body>
 </html>


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.237 llvm/docs/LangRef.html:1.238
--- llvm/docs/LangRef.html:1.237	Sun Apr 22 09:56:37 2007
+++ llvm/docs/LangRef.html	Wed Apr 25 09:27:10 2007
@@ -498,7 +498,8 @@
 <p>It is illegal for a function <i>declaration</i>
 to have any linkage type other than "externally visible", <tt>dllimport</tt>,
 or <tt>extern_weak</tt>.</p>
-
+<p>Aliases can have only <tt>external</tt>, <tt>internal</tt> and <tt>weak</tt>
+linkages.
 </div>
 
 <!-- ======================================================================= -->
@@ -602,12 +603,11 @@
 
 <p>Global variables define regions of memory allocated at compilation time
 instead of run-time.  Global variables may optionally be initialized, may have
-an explicit section to be placed in, and may
-have an optional explicit alignment specified.  A variable may be defined as
-"thread_local", which means that it will not be shared by threads (each thread
-will have a separated copy of the variable).
-A variable may be defined as a global "constant," which indicates that the
-contents of the variable will <b>never</b> be modified (enabling better
+an explicit section to be placed in, and may have an optional explicit alignment
+specified.  A variable may be defined as "thread_local", which means that it
+will not be shared by threads (each thread will have a separated copy of the
+variable).  A variable may be defined as a global "constant," which indicates
+that the contents of the variable will <b>never</b> be modified (enabling better
 optimization, allowing the global data to be placed in the read-only section of
 an executable, etc).  Note that variables that need runtime initialization
 cannot be marked "constant" as there is a store to the variable.</p>
@@ -698,6 +698,27 @@
 
 </div>
 
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="aliasstructure">Aliases</a>
+</div>
+<div class="doc_text">
+  <p>Aliases act as "second name" for the aliasee value (which can be either
+  function or global variable). Aliases may have an
+  optional <a href="#linkage">linkage type</a>, and an
+  optional <a href="#visibility">visibility style</a>.</p>
+
+  <h5>Syntax:</h5>
+
+  <pre>
+    @<Name> = [Linkage] [Visibility] alias <AliaseeTy> @<Aliasee>
+  </pre>
+
+</div>
+
+
+
 <!-- ======================================================================= -->
 <div class="doc_subsection"><a name="paramattrs">Parameter Attributes</a></div>
 <div class="doc_text">
@@ -4728,7 +4749,7 @@
 
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2007/04/22 14:56:37 $
+  Last modified: $Date: 2007/04/25 14:27:10 $
 </address>
 </body>
 </html>






More information about the llvm-commits mailing list