Written by Reid Spencer
This document describes the contents of the many objects files and libraries that are produced by compiling LLVM. To make use of LLVM this information is needed in order to understand what files should be linked into your program.
If you're writing a compiler, virtual machine, or any other utility for LLVM, you'll need to figure out which of the many .a (archive) and .o (object) files you will need to link with to be successful. An understanding of the contents of these files and their inter-relationships will be useful in coming up with an optimal specification for the objects and libraries to link with.
The purpose of this document is to hopefully reduce some of the trial and error that the author experienced in using LLVM.
The table below provides a summary of the basic contents of each file.
Summary Of LLVM Library And Object Files | |
Library |
Description |
libipo.a | An archive of all inter-procedural optimizations. |
libscalaropts.a | An archive of all scalar optimizations. |
libtransforms.a | An archive of all code transformations. |
libtarget.a | An archive containing target (machine) specific code. |
libanalysis.a | An archive containing analysis code. |
libdatastructure.a | An archive containing optimizations for data structures. |
libinstrument.a | No idea. |
libregalloc.a | Register Allocation code. |
libipa.a | Inter-procedural ?? |
libtransformutils.a | Utiltities for transformations? |
libsupport.a | General support utilities |
Object File |
Description |
support.o | General support utilities |
asmparser.o | Assembler Parser |
bcreader.o | Byte Code Reader |
bcwriter.o | Byte Code Writer |
sched.o | Scheduler? For What? |
selectiondag.o | Selection Directed Acyclic Graph? |
transformutils.o | Utilities for code transformations |
ipa.o | Inter-Procedural Analysis Optimizations |
select.o | Select Statement? |
cwriter.o | "C" Code Writer |
profpaths.o | Profile Paths? |
regalloc.o | Register Allocation |
instrument.o | Instrumentation? Of What? |
datastructure.o | Data Structure Analysis |
codegen.o | Native code generation |
livevar.o | Live Variable Analysis |
vmcore.o | Virtual Machine Core |
lli-interpreter.o | Interpreter for LLVM ByteCode |
lli-jit.o | Just-In-Time Compiler For LLVM ByteCode |
executionengine.o | Engine for LLI |
debugger.o | Source Level Debugging Support |
analysis.o | General Framework For Analysis? |
sparc.o | Sun SPARC Processor Specific |
target.o | Target Machine Support? |
transforms.o | Code Transformations |
x86.o | Intel x86 Processor Specific |
powerpc.o | PowerPC Processor Specific |
scalaropts.o | Optimizations For Scalars |
ipo.o | Inter-Procedural Optimization |
trace.o | Support For Tracing/Debugging? |
profile_rt.o | Runtime Library For Profiler |
sample.o | Sample Program ? |
stkr_compiler.o | Stacker Language Compiler Library |
stkr_runtime.o | Stacker Language Runtime Library |
This section contains various "rules of thumb" about what files you should link into your programs.
No matter what you do with LLVM, you'll always need to link with vmcore.o and support.a.
Need more rules of thumb here.