setenv PATH llvm/tools/Debug:${PATH}
at the end of the file .cshrc in your home directory.
Many useful infomation can be obtained from the LLVM doxygen tree available at http://llvm.cs.uiuc.edu/doxygen/
The following is a brief introduction to code layout:
Most directories contain these two directories. The depend directory contains dependance files which will be used during complilation. The debug directory contains object files, library files or executables after compilation.
This directory contains common head files supporting the LLVM library. Specific head files which are only used by certain directory are place in that directory instead of here.
This directory contains most important files of LLVM system.
- llvm/lib/transforms/
- This directory contains files and directories for transforming one representation to another representation.
- llvm/lib/Target/
- This directory contains files and directories for target machine. The files under llvm/lib/Target describe the common property for any target machine. The directory llvm/lib/Target/Sparc describe the sparc machine specification.
- llvm/lib/Analysis/
- This directory contains files and directories for doing all kinds of data and control analysis.
- llvm/lib/AsmParser/
- This directory contains files and directories for parsing the llvm assemly files.
- llvm/lib/ByteCode/
- This directory contains files and directories for reading and write LLVM bytecode.
- llvm/lib/CWrite/
- This directory contains files and directories for writing c files as output.
- llvm/lib/CodeGen/
- This directory contains files and directories for instruction selection, instruction scheduling and register allocation.
- llvm/lib/Reoptimizer
- This directory contains files and directories for all kinds of optimizations, e.g. dead code elimination, Loop Invariant Code Motion, etc.
- llvm/lib/Support/
- This directory contains some files and directories supporting the library, e.g. commandline processor and statistic reporter.
- llvm/lib/VMCore/
- This directory contains files and directories for implementing the virtual machine instruction set.
This directory contains llvm assembly and other files to test the llvm library.
The tools directory contains many tools. You can always get help by typing command_name --help . The following is a brief introduction to each tool.
- analyze
- ???
- as
- llvm .ll -> .bc assembler
The assembler transfroms the human readable assembly to llvm bytecode.
- dis
- llvm .bc -> .ll disassembler
The disassembler transfroms the llvm bytecode to human readable assembly.
- extract
- ???
- gccas
- llvm .ll -> .bc assembler
The assembler transfroms the human readable assembly to llvm bytecode.
- gccld
- many llvm bytecode -> llvm bytecode + optimizations
gccld links many llvm bytecode files into one bytecode file and does some optimization.
- link
- many llvm bytecode -> llvm bytecode
link takes many llvm bytecode files and link them into one llvm bytecode file.
- llc
- llvm bytecode -> SPARC assembly
llc takes a llvm bytecode file and output a SPARC assembly file.
- lli
- llvm interpreter
lli reads a llvm bytecode file and execute it.
- opt
- llvm .bc -> .bc modular optimizer
opt reads llvm bytecode and do certain optimization, then output llvm bytecode .
If you have any question, please send an email to Lattner Chris Arthur or Guochun Shi.
Last modified: Wed Jul 17 17:55:16 CDT 2002