[LLVMdev] Loading ProfileInfo

Chris Lattner sabre at nondot.org
Thu Mar 17 21:39:22 PST 2005


On Thu, 17 Mar 2005, Chris Lattner wrote:
>> 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:

I should note that the pass is not the only way to load profile info.  If 
you just want to load the info without dealing with the pass system, you 
can just use the llvm/Analysis/ProfileInfoLoader.h header directly, which 
is what llvm-prof does, for example.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list