[LLVMdev] Loading ProfileInfo

Chris Lattner sabre at nondot.org
Thu Mar 17 21:38:03 PST 2005

On Thu, 17 Mar 2005, Eric Zimmerman wrote:
> Chris,
> Thanks, that worked.  For my own understanding, I wondered if using
> the opt command-line is the only way to request a
> ProfileInfoLoaderPass?  What if I want to use this information in the
> 'analyze' utility instead of 'opt'?

Ah, very reasonable :).  If you update CVS, it should be available in both 
opt and analyze now.

> Also, rather than requesting the pass interactively, can I somehow use
> the constructor provided in ProfileInfo.h?  Here is the prototype, but
> I'm not sure how to use it:
> Pass *createProfileLoaderPass(const std::string &Filename);

That is only useful if you have a PassManager object.  Given that, you 
could do something (roughly) like this:

PassManager PM;



More information about the llvm-dev mailing list