[LLVMdev] PassManager vs. FunctionPassManager

Duncan Sands baldrick at free.fr
Sat Jun 5 01:11:29 PDT 2010


>> What's the point of having two pass managers here?  Why not just use
>> "Passes" for everything?
>
> This is done to replicate what llvm-gcc does. First pass manager to
> optimizer each function individually at the end of the function.
> Second pass manager to optimize entire module.  Add
> -fdebug-pass-arguments on the llvm-gcc command line for more info.

I always assumed that the per-function passes, which are run on each
function when it is generated, are there to reduce the size of the
bitcode, enabling llvm-gcc to handle larger compile units.

Ciao,

Duncan.




More information about the llvm-dev mailing list