[llvm-commits] [llvm] r93172 - /llvm/trunk/docs/LangRef.html

Devang Patel dpatel at apple.com
Mon Jan 11 11:35:55 PST 2010


Author: dpatel
Date: Mon Jan 11 13:35:55 2010
New Revision: 93172

URL: http://llvm.org/viewvc/llvm-project?rev=93172&view=rev
Log:
Add top level section for named metadata.


Modified:
    llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=93172&r1=93171&r2=93172&view=diff

==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Mon Jan 11 13:35:55 2010
@@ -43,6 +43,7 @@
       <li><a href="#globalvars">Global Variables</a></li>
       <li><a href="#functionstructure">Functions</a></li>
       <li><a href="#aliasstructure">Aliases</a></li>
+      <li><a href="#namedmetadatastructure">Named Metadata</a></li>
       <li><a href="#paramattrs">Parameter Attributes</a></li>
       <li><a href="#fnattrs">Function Attributes</a></li>
       <li><a href="#gc">Garbage Collector Names</a></li>
@@ -85,12 +86,12 @@
       <li><a href="#undefvalues">Undefined Values</a></li>
       <li><a href="#blockaddress">Addresses of Basic Blocks</a></li>
       <li><a href="#constantexprs">Constant Expressions</a></li>
-      <li><a href="#metadata">Embedded Metadata</a></li>
     </ol>
   </li>
   <li><a href="#othervalues">Other Values</a>
     <ol>
       <li><a href="#inlineasm">Inline Assembler Expressions</a></li>
+      <li><a href="#metadata">Metadata Nodes and Metadata Strings</a></li>
     </ol>
   </li>
   <li><a href="#intrinsic_globals">Intrinsic Global Variables</a>
@@ -498,14 +499,19 @@
 
   <i>; Call puts function to write out the string to stdout.</i>
   <a href="#i_call">call</a> i32 @puts(i8 * %cast210)                             <i>; i32</i>
-  <a href="#i_ret">ret</a> i32 0<br>}<br>
+  <a href="#i_ret">ret</a> i32 0<br>}
+
+<i>; Named metadata</i>
+!1 = metadata !{i32 41}
+!foo = !{!1, null}
 </pre>
 </div>
 
 <p>This example is made up of a <a href="#globalvars">global variable</a> named
-   "<tt>.LC0</tt>", an external declaration of the "<tt>puts</tt>" function, and
+   "<tt>.LC0</tt>", an external declaration of the "<tt>puts</tt>" function,
    a <a href="#functionstructure">function definition</a> for
-   "<tt>main</tt>".</p>
+   "<tt>main</tt>" and <a href="#namedmetadatastructure">named metadata</a> 
+   "<tt>foo"</tt>.</p>
 
 <p>In general, a module is made up of a list of global values, where both
    functions and global variables are global values.  Global values are
@@ -912,6 +918,27 @@
 </div>
 
 <!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="namedmetadatastructure">Named Metadata</a>
+</div>
+
+<div class="doc_text">
+
+<p>Named metadata is a collection of metadata. <a href="#metadata"> Metadata </a>
+   node and null are the only valid named metadata operands. 
+   Metadata strings are not allowed as an named metadata operand.</p>
+
+<h5>Syntax:</h5>
+<div class="doc_code">
+<pre>
+!1 = metadata !{metadata !"one"}
+!name = !{null, !1}
+</pre>
+</div>
+
+</div>
+
+<!-- ======================================================================= -->
 <div class="doc_subsection"><a name="paramattrs">Parameter Attributes</a></div>
 
 <div class="doc_text">
@@ -2314,12 +2341,12 @@
 </div>
 
 <!-- ======================================================================= -->
-<div class="doc_subsection"><a name="metadata">Embedded Metadata</a>
+<div class="doc_subsection"><a name="metadata">Metadata Nodes and Metadata Strings</a>
 </div>
 
 <div class="doc_text">
 
-<p>Embedded metadata provides a way to attach arbitrary data to the instruction
+<p>Metadata provides a way to attach arbitrary data to the instruction
    stream without affecting the behaviour of the program.  There are two
    metadata primitives, strings and nodes. All metadata has the
    <tt>metadata</tt> type and is identified in syntax by a preceding exclamation
@@ -2338,8 +2365,8 @@
    event that a value is deleted, it will be replaced with a typeless
    "<tt>null</tt>", such as "<tt>metadata !{null, i32 10}</tt>".</p>
 
-<p>A named metadata is a collection of metadata nodes. For example: "<tt>!foo =
-   metadata !{!4, !3}</tt>".
+<p>A <a href="#namedmetadatastructure">named metadata</a> is a collection of 
+   metadata nodes. For example: "<tt>!foo =  metadata !{!4, !3}</tt>".
 
 <p>Optimizations may rely on metadata to provide additional information about
    the program that isn't available in the instructions, or that isn't easily





More information about the llvm-commits mailing list