[LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?

Misha Brukman brukman at cs.uiuc.edu
Thu Jul 7 15:15:57 PDT 2005


On Thu, Jul 07, 2005 at 03:52:42PM -0500, Long Fei wrote:
> I noticed that the inlining condition (in
> Transforms/IPO/InlineSimple.cpp) is tested during llvm-gcc but not
> during the opt phase ? Can anybody explain what happens during
> llvm-gcc and opt respectively ?

John answered the llvm-gcc part, so let me address the opt part.

`opt' is a modular optimizer, but it will do exactly what you tell it to
do, and nothing more, so if you say "opt -inline < input.bc > output.bc"
it will only inline.  Note that if you say "opt < old.bc > new.bc" opt
will do nothing.

This differs from gccas and gccld which have a built-in list of
optimizations that they run, which you can get a list of if you follow
the directions here:

http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html#gccas
http://llvm.cs.uiuc.edu/docs/HowToSubmitABug.html#gccld

or just read their source code.

-- 
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu




More information about the llvm-dev mailing list