[LLVMdev] a very beginning question

Reid Spencer reid at x10sys.com
Sun Sep 4 20:58:06 PDT 2005


shding at mtu.edu wrote:
> Hi,
>   Where can I find the main function of llvm compiler in the source file?
>   Thanks!

Well, there's a loaded question. :)

It depends on "which" compiler you mean. If you're talking about the llvm-gcc 
and llvm-g++ compilers (C/C++ to LLVM) then they are in the downloadable 
tarballs available here: http://llvm.cs.uiuc.edu/releases/. You can also get 
them via CVS using the llvm-gcc repository name.

If you're talking about the llc compiler (LLVM to machine code), it is in the 
llvm repository under tools/llc, however most of the code consists of the 
various libraries that make up LLVM (viewable at 
http://illuvium.com/cgi-bin/cvsweb.cgi/llvm/lib/), in particular the assembler 
(lib/AsmParser), Bytecode facilities (lib/Bytecode), code generation code 
(lib/Codegen), and target-specific translators (lib/Target).

If you're talking about the generic compiler, llvmc, you can find it at the 
tools/llvmc directory.

If you're talking about the (partially complete) Java interface, you can find 
it in the llvm-java repository.

If you're talking about the Stacker compiler, you can find it in the llvm 
repository at projects/Stacker/lib/compiler.

Hope this helps.

Reid




More information about the llvm-dev mailing list