[LLVMdev] a very beginning question

shding at mtu.edu shding at mtu.edu
Mon Sep 5 13:59:14 PDT 2005


   Thank you.
   I'm only consider about how the compiler comiles c program to LLVM IR.
I know there should be a scanner, parser, and IR generator. But where
is the main entrance and  how about the flow of the process, especially
about the IR generator?


> 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
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>


-- 
Shuhan




More information about the llvm-dev mailing list