[LLVMdev] how to read the llvm source-file?

Misha Brukman brukman at cs.uiuc.edu
Sun Aug 28 09:29:44 PDT 2005

On Sun, Aug 28, 2005 at 10:18:06AM +0800, 4 wrote:
> I am a new user of the llvm .
> where should I to start the llvm -sourcefile.
> As there is many tools .What are the most important?

Chances are, not matter what you do, you'll use llvm-dis and llvm-as but
you only need to know *WHAT* they do, not *HOW* they do it.

> what the order of reading the sourcefile is most efficienc?

It all depends on what you are trying to do.

If you are interested in code generation -- llvm/lib/Target/* and
llvm/lib/CodeGen/* and llvm/lib/ExecutionEngine/* for dynamic (JIT)

If you are interested in analysis -- llvm/lib/Analysis/*

If you are interested in optimizations -- llvm/lib/Transform/*

The tools are mostly wrappers around the libraries, it is the libraries
that contain the interesting code.  Look at how much code is in
llvm/tools/llc/*.cpp vs. how many libraries are listed in
llvm/tools/llc/Makefile .  Same goes for lli.

Good luck,
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu

More information about the llvm-dev mailing list