Continue refactoring inline asm code. If there is an earlyclobber output
[oota-llvm.git] / docs / LinkTimeOptimization.html
index 0573a421aa55bb6c4cd87c77424bc3923fd0201d..1084e35271226e1500445f145efa4337d91bd51d 100644 (file)
@@ -29,6 +29,9 @@
     <li><a href="#llvmsymbol">LLVMSymbol</a></li>
     <li><a href="#readllvmobjectfile">readLLVMObjectFile()</a></li>
     <li><a href="#optimizemodules">optimizeModules()</a></li>
+    <li><a href="#gettargettriple">getTargetTriple()</a></li>
+    <li><a href="#removemodule">removeModule()</a></li>
+    <li><a href="#getalignment">getAlignment()</a></li>
   </ul></li>
   <li><a href="#debug">Debugging Information</a></li>
 </ul>
@@ -79,13 +82,15 @@ conservative escape analysis.
 </div>
 
 <div class="doc_text">
-  <p>The following example illustrates the advantages of LTO's integrated 
-  approach and clean interface.</p>
+  <p>The following example illustrates the advantages of LTO's integrated
+  approach and clean interface. This example requires a system linker which
+  supports LTO through the interface described in this document.  Here,
+  llvm-gcc4 transparently invokes system linker. </p>
   <ul>
     <li> Input source file <tt>a.c</tt> is compiled into LLVM byte code form.
     <li> Input source file <tt>main.c</tt> is compiled into native object code.
   </ul>
-<pre>
+<div class="doc_code"><pre>
 --- a.h ---
 extern int foo1(void);
 extern void foo2(void);
@@ -129,7 +134,7 @@ int main() {
 $ llvm-gcc4 --emit-llvm -c a.c -o a.o  # &lt;-- a.o is LLVM bytecode file
 $ llvm-gcc4 -c main.c -o main.o # &lt;-- main.o is native object file
 $ llvm-gcc4 a.o main.o -o main # &lt;-- standard link command without any modifications
-</pre>
+</pre></div>
   <p>In this example, the linker recognizes that <tt>foo2()</tt> is an 
   externally visible symbol defined in LLVM byte code file. This information 
   is collected using <a href="#readllvmobjectfile"> readLLVMObjectFile()</a>. 
@@ -305,7 +310,7 @@ $ llvm-gcc4 a.o main.o -o main # &lt;-- standard link command without any modifi
 
 <div class="doc_text">
   <p>The <tt>readLLVMObjectFile()</tt> function is used by the linker to read 
-  LLVM bytecode files and collect LLVMSymbol innformation. This routine also
+  LLVM bytecode files and collect LLVMSymbol information. This routine also
   supplies a list of externally defined symbols that are used by LLVM bytecode
   files. The linker uses this symbol information to do symbol resolution. 
   Internally, <a href="#lto">LLVMlto</a> maintains LLVM bytecode modules in 
@@ -326,6 +331,37 @@ $ llvm-gcc4 a.o main.o -o main # &lt;-- standard link command without any modifi
   linker.</p>
 </div>
 
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="gettargettriple">getTargetTriple()</a>
+</div>
+
+<div class="doc_text">
+  <p>The linker may use <tt>getTargetTriple()</tt> to query target architecture
+  while validating LLVM bytecode file.</p>
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="removemodule">removeModule()</a>
+</div>
+
+<div class="doc_text">
+  <p>Internally, <a href="#lto">LLVMlto</a> maintains LLVM bytecode modules in 
+  memory. The linker may use <tt>removeModule()</tt> method to remove desired
+  modules from memory. </p>
+</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="getalignment">getAlignment()</a>
+</div>
+
+<div class="doc_text">
+  <p>The linker may use <a href="#llvmsymbol">LLVMSymbol</a> method 
+  <tt>getAlignment()</tt> to query symbol alignment information.</p>
+</div>
+
 <!-- *********************************************************************** -->
 <div class="doc_section">
   <a name="debug">Debugging Information</a>