[llvm-commits] [llvm] r42211 - in /llvm/trunk: docs/LangRef.html include/llvm/Intrinsics.td

Tanya Lattner tonic at nondot.org
Fri Sep 21 15:59:12 PDT 2007


Author: tbrethou
Date: Fri Sep 21 17:59:12 2007
New Revision: 42211

URL: http://llvm.org/viewvc/llvm-project?rev=42211&view=rev
Log:
Adding support for __builtin_annotation with an intrinsic called llvm.annotation. This is similar to llvm.var.annotation but is applied to expressions.

Modified:
    llvm/trunk/docs/LangRef.html
    llvm/trunk/include/llvm/Intrinsics.td

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

==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Fri Sep 21 17:59:12 2007
@@ -210,6 +210,10 @@
           <li><a href="#int_var_annotation">
             <tt>llvm.var.annotation</tt>' Intrinsic</a></li>
         </ol>
+        <ol>
+          <li><a href="#int_annotation">
+            <tt>llvm.annotation</tt>' Intrinsic</a></li>
+        </ol>
       </li>
     </ol>
   </li>
@@ -5263,6 +5267,39 @@
  generation and optimization.
 </div>
 
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+  <a name="int_annotation">'<tt>llvm.annotation</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+  declare i32 @llvm.annotation(i32 <val>, i8* <str>, i8* <str>, i32  <int> )
+</pre>
+
+<h5>Overview:</h5>
+<p>This is an overloaded intrinsic. You can use '<tt>llvm.annotation</tt>' on 
+any integer bit width. Not all targets support all bit widths however.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The first argument is an integer value (result of some expression), 
+the second is a pointer to a global string, the third is a pointer to a global 
+string which is the source file name, and the last argument is the line number.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+This intrinsic allows annotations to be put on arbitrary expressions
+with arbitrary strings.  This can be useful for special purpose optimizations 
+that want to look for these annotations.  These have no other defined use, they 
+are ignored by code generation and optimization.
+</div>
 
 <!-- *********************************************************************** -->
 <hr>

Modified: llvm/trunk/include/llvm/Intrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=42211&r1=42210&r2=42211&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Intrinsics.td (original)
+++ llvm/trunk/include/llvm/Intrinsics.td Fri Sep 21 17:59:12 2007
@@ -240,6 +240,10 @@
 def int_var_annotation : Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty,
                                     llvm_ptr_ty, llvm_i32_ty], 
                                     [], "llvm.var.annotation">;
+                                    
+def int_annotation : Intrinsic<[llvm_anyint_ty, LLVMMatchType<0>, llvm_ptr_ty,
+                                llvm_ptr_ty, llvm_i32_ty], 
+                                [], "llvm.annotation">;
 
 //===------------------------ Trampoline Intrinsics -----------------------===//
 //





More information about the llvm-commits mailing list