[LLVMdev] Pass Scheduling Information without using opt

Daniel Dunbar daniel at zuster.org
Sun Jul 26 15:53:12 PDT 2009


On Sun, Jul 26, 2009 at 1:48 PM, Ralf Karrenberg<Chareos at gmx.de> wrote:
> Hey Daniel,
>
> thanks for the response.
>
>> I believe all you need to do is call llvm::llvm_shutdown().
>>
> I am not sure that this is what I need. When and how should I call
> llvm_shutdown()?

At the end of the program, this just arranges for LLVM's "managed
statics" to be shutdown, which will triggering the printing of pass
information.

> After the FunctionPassManager is done, the calling ModulePass still
> performs quite a few actions on the transformed code and also calls the
> FunctionPassManager on different functions. However, I need to display
> statistics about the transformation of each function separately.

Ah, in this case llvm_shutdown isn't what you are looking for. I've
never looked at the Statistic implementation so I can't be any help
here, but if you poke around starting with "llvm/ADT/Statistic.h" you
may find a way to do what you want.

 - Daniel



More information about the llvm-dev mailing list