[LLVMdev] What llvm tool will llvm-gcc call in each phase?

Duncan Sands baldrick at free.fr
Wed Feb 27 07:04:40 PST 2008


Hi,

>   Suppose I have a file test.c, If i use
> 
>   llvm-gcc -o test.out test.c
> 
>   then what llvm tool will llvm-gcc call in each step?

none, it is linked directly to the LLVM libraries.

>   if I use llvm-gcc -O2 -o test.out test.c
> 
>   then the argument '-O2' will be pass to opt? that is all the
> optimization is done by opt or llvm will benefit some optimization from
> gcc?

It chooses a set of passes to run based on the -O option.

>   I have try to grep "llc" etc in llvm-gcc source code but have find
> nothing.

Look in createOptimizationPasses in llvm-backend.cpp.

Ciao,

Duncan.



More information about the llvm-dev mailing list