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

Devang Patel dpatel at apple.com
Thu Sep 4 16:05:14 PDT 2008


Author: dpatel
Date: Thu Sep  4 18:05:13 2008
New Revision: 55808

URL: http://llvm.org/viewvc/llvm-project?rev=55808&view=rev
Log:
Document function notes.

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=55808&r1=55807&r2=55808&view=diff

==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Thu Sep  4 18:05:13 2008
@@ -750,7 +750,8 @@
 <a href="#paramattrs">parameter attribute</a> for the return type, a function 
 name, a (possibly empty) argument list (each with optional 
 <a href="#paramattrs">parameter attributes</a>), an optional section, an
-optional alignment, an optional <a href="#gc">garbage collector name</a>, an
+optional alignment, an optional <a href="#gc">garbage collector name</a>, 
+an optional <a href="#notes">function notes</a>, an
 opening curly brace, a list of basic blocks, and a closing curly brace.
 
 LLVM function declarations consist of the "<tt>declare</tt>" keyword, an
@@ -912,6 +913,41 @@
 
 <!-- ======================================================================= -->
 <div class="doc_subsection">
+  <a name="notes">Function Notes</a>
+</div>
+
+<div class="doc_text">
+<p>Each function may specify function notes.</p>
+
+<div class="doc_code">
+<pre>define void @f() notes(inline=Always) { ... }</pre>
+<pre>define void @f() notes(inline=Always,opt-size) { ... }</pre>
+<pre>define void @f() notes(inline=Never,opt-size) { ... }</pre>
+<pre>define void @f() notes(opt-size) { ... }</pre>
+</div>
+
+<p>
+<li>inline=Always
+<p>
+This note requests inliner to inline this function irrespective of
+inlining size threshold for this function.
+</p></li>
+<li>inline=Never
+<p>
+This note requests inliner to never inline this function in any situation. 
+This note may not be used together with inline=Always note.
+</p></li>
+<li>opt-size
+<p>
+This note suggests optimization passes and code generator passes to make 
+choices that help reduce code size.
+</p></li>
+<p>
+The notes that are not documented here are considered invalid notes.
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
   <a name="moduleasm">Module-Level Inline Assembly</a>
 </div>
 





More information about the llvm-commits mailing list