* CSS was created to reduce re-specifying design styles: specify table cell
[oota-llvm.git] / docs / UsingLibraries.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
2                       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html>
4 <head>
5         <title>Object Files: Understanding The Result Of LLVM Compilation</title>
6   <link rel="stylesheet" href="llvm.css" type="text/css">
7   <style>
8   <!--
9     td { border: 2px solid gray }
10   -->
11   </style>
12 </head>
13 <body>
14 <div class="doc_title">
15   Object Files: Understanding The Result Of LLVM Compilation
16 </div>
17
18 <ol>
19   <li><a href="#abstract">Abstract</a></li>
20   <li><a href="#introduction">Introduction</a></li>
21   <li><a href="#files">File Contents</a></li>
22   <li><a href="#rot">Linkage Rules Of Thumb</a>
23           <ol>
24                         <li><a href="#always">Always Link vmcore.o, support.a</a>
25                         <li><a href="#placeholder">Placeholder</a>
26                 </ol>
27         </li>
28 </ol>
29
30 <div class="doc_author">
31   <p>Written by <a href="mailto:rspencer@x10sys.com">Reid Spencer</a></p>
32 </div>
33
34 <!-- ======================================================================= -->
35 <div class="doc_section"><a name="abstract">Abstract</a></div>
36 <div class="doc_text">
37 <p>This document describes the contents of the many objects files and libraries
38 that are produced by compiling LLVM. To make use of LLVM this information is 
39 needed in order to understand what files should be linked into your program.
40 </p>
41 </div>
42 <!-- ======================================================================= -->
43 <div class="doc_section"> <a name="introduction">Introduction</a></div>
44 <div class="doc_text">
45 <p>If you're writing a compiler, virtual machine, or any other utility for
46          LLVM, you'll need to figure out which of the many .a (archive) and .o
47          (object) files you will need to link with to be successful. An
48          understanding of the contents of these files and their inter-relationships
49          will be useful in coming up with an optimal specification for the objects
50          and libraries to link with. 
51 </p>
52 <p>The purpose of this document is to hopefully reduce some of the trial and
53    error that the author experienced in using LLVM.
54 </p>
55 </div>
56 <!-- ======================================================================= -->
57 <div class="doc_section"><a name="files"></a>File Contents</div>
58 <div class="doc_text">
59 <p>The table below provides a summary of the basic contents of each file.</p>
60 <table class="doc_table" 
61         style="width:80%; text-align: left; border: 2px solid gray; border-collapse: collapse;">
62 <tr class="doc_table">
63         <td colspan="2" class="doc_section">Summary Of LLVM Library And Object Files
64         </td>
65 </tr>
66 <tr class="doc_table">
67         <td><h2><u>Library</u></h2></td>
68         <td><h2><u>Description</u></h2></td>
69 </tr>
70 <tr class="doc_table">
71         <td>libipo.a</td>
72         <td>
73                 An archive of all inter-procedural optimizations.
74         </td>
75 </tr>
76 <tr class="doc_table">
77         <td>libscalaropts.a</td>
78         <td>
79                 An archive of all scalar optimizations.
80         </td>
81 </tr>
82 <tr class="doc_table">
83         <td>libtransforms.a</td>
84         <td>
85                 An archive of just the level raise pass.
86         </td>
87 </tr>
88 <tr class="doc_table">
89         <td>libtarget.a</td>
90         <td>
91                 An archive containing code generator support for describing
92                 target architectures.
93         </td>
94 </tr>
95 <tr class="doc_table">
96         <td>libanalysis.a</td>
97         <td>
98                 An archive containing intra-procedural analyses.
99         </td>
100 </tr>
101 <tr class="doc_table">
102         <td>libdatastructure.a</td>
103         <td>
104                 An archive containing optimizations for data structures.
105         </td>
106 </tr>
107 <tr class="doc_table">
108         <td>libinstrument.a</td>
109         <td>No idea.</td>
110 </tr>
111 <tr class="doc_table">
112         <td>libregalloc.a</td>
113         <td>Register Allocation code.</td>
114 </tr>
115 <tr class="doc_table">
116         <td>libipa.a</td>
117         <td>
118                 An archive containing inter-procedural analyses</td>
119 </tr>
120 <tr class="doc_table">
121         <td>libtransformutils.a</td>
122         <td>
123                 Utiltities for transformations?
124         </td>
125 </tr>
126 <tr class="doc_table">
127         <td>libsupport.a</td>
128         <td>General support utilities</td>
129 </tr>
130 <tr class="doc_table">
131         <td>libevar.a</td>
132         <td>Live variable analysis for SPARC</td>
133 </tr>
134 <tr class="doc_table">
135         <td><h2><u>Object File</u></h2></td>
136         <td><h2><u>Description</u></h2></td>
137 </tr>
138 <tr class="doc_table">
139         <td>support.o</td>
140         <td>General support utilities</td>
141 </tr>
142 <tr class="doc_table">
143         <td>asmparser.o</td>
144         <td>Assembler Parser</td>
145 </tr>
146 <tr class="doc_table">
147         <td>bcreader.o</td>
148         <td>Byte Code Reader</td>
149 </tr>
150 <tr class="doc_table">
151         <td>bcwriter.o</td>
152         <td>Byte Code Writer</td>
153 </tr>
154 <tr class="doc_table">
155         <td>sched.o</td>
156         <td>SPARC instruction scheduler</td>
157 </tr>
158 <tr class="doc_table">
159         <td>selectiondag.o</td>
160         <td>Aggressive instruction selector for Directed Acyclic Graphs</td>
161 </tr>
162 <tr class="doc_table">
163         <td>transformutils.o</td>
164         <td>Utilities for code transformations</td>
165 </tr>
166 <tr class="doc_table">
167         <td>ipa.o</td>
168         <td>Inter-Procedural Analysis Optimizations</td>
169 </tr>
170 <tr class="doc_table">
171         <td>select.o</td>
172         <td>SPARC instruction selector</td>
173 </tr>
174 <tr class="doc_table">
175         <td>cwriter.o</td>
176         <td>"C" Code Writer</td>
177 </tr>
178 <tr class="doc_table">
179         <td>profpaths.o</td>
180         <td>Path profiling instrumentation</td>
181 </tr>
182 <tr class="doc_table">
183         <td>regalloc.o</td>
184         <td>Register Allocation</td>
185 </tr>
186 <tr class="doc_table">
187         <td>instrument.o</td>
188         <td>Instrumentation? Of What?</td>
189 </tr>
190 <tr class="doc_table">
191         <td>datastructure.o</td>
192         <td>Data Structure Analysis</td>
193 </tr>
194 <tr class="doc_table">
195         <td>codegen.o</td>
196         <td>Native code generation</td>
197 </tr>
198 <tr class="doc_table">
199         <td>livevar.o</td>
200         <td>Live Variable Analysis</td>
201 </tr>
202 <tr class="doc_table">
203         <td>vmcore.o</td>
204         <td>Virtual Machine Core</td>
205 </tr>
206 <tr class="doc_table">
207         <td>lli-interpreter.o</td>
208         <td>Interpreter for LLVM ByteCode</td>
209 </tr>
210 <tr class="doc_table">
211         <td>lli-jit.o</td>
212         <td>
213                 Just-In-Time Compiler For LLVM ByteCode
214         </td>
215 </tr>
216 <tr class="doc_table">
217         <td>executionengine.o</td>
218         <td>Engine for LLI</td>
219 </tr>
220 <tr class="doc_table">
221         <td>debugger.o</td>
222         <td>Source Level Debugging Support</td>
223 </tr>
224 <tr class="doc_table">
225         <td>analysis.o</td>
226         <td>General Framework For Analysis?</td>
227 </tr>
228 <tr class="doc_table">
229         <td>sparc.o</td>
230         <td>Sun SPARC Processor Specific</td>
231 </tr>
232 <tr class="doc_table">
233         <td>target.o</td>
234         <td>Target Machine Support?</td>
235 </tr>
236 <tr class="doc_table">
237         <td>transforms.o</td>
238         <td>Code Transformations</td>
239 </tr>
240 <tr class="doc_table">
241         <td>x86.o</td>
242         <td>Intel x86 Processor Specific</td>
243 </tr>
244 <tr class="doc_table">
245         <td>powerpc.o</td>
246         <td>PowerPC Processor Specific</td>
247 </tr>
248 <tr class="doc_table">
249         <td>scalaropts.o</td>
250         <td>Optimizations For Scalars</td>
251 </tr>
252 <tr class="doc_table">
253         <td>ipo.o</td>
254         <td>Inter-Procedural Optimization</td>
255 </tr>
256 <tr class="doc_table">
257         <td>trace.o</td>
258         <td>Support For Tracing/Debugging?</td>
259 </tr>
260 <tr class="doc_table">
261         <td>profile_rt.o</td>
262         <td>Runtime Library For Profiler</td>
263 </tr>
264 <tr class="doc_table">
265         <td>sample.o</td>
266         <td>Sample Program ?</td>
267 </tr>
268 <tr class="doc_table">
269         <td>stkr_compiler.o</td>
270         <td>Stacker Language Compiler Library</td>
271 </tr>
272 <tr class="doc_table">
273         <td>stkr_runtime.o</td>
274         <td>Stacker Language Runtime Library</td>
275 </tr>
276 </table>
277 </div>
278 <p></p>
279 <!-- ======================================================================= -->
280 <div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div>
281 <div class="doc_text">
282         <p>This section contains various "rules of thumb" about what files you
283         should link into your programs.</p>
284 </div>
285 <!-- ======================================================================= -->
286 <div class="doc_subsection"><a name="always">Always Link vmcore.o support.a</a>
287 </div>
288 <div class="doc_text">
289         <p>No matter what you do with LLVM, you'll always need to link with vmcore.o 
290         and support.a.</p>
291 </div>
292 <!-- ======================================================================= -->
293 <div class="doc_subsection"><a name="Placeholder">Placeholder</a></div>
294 <div class="doc_text">
295         <p>Need more rules of thumb here.</p>
296 </div>
297 <!-- ======================================================================= -->
298 <hr>
299 <div class="doc_footer">
300 <address><a href="mailto:rspencer@x10sys.com">Reid Spencer</a></address>
301 <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a> 
302 <br>Last modified: $Date$ </div>
303 </body>
304 </html>
305 <!-- vim: sw=2 ts=2 ai
306 -->