[LLVMdev] Loading ProfileInfo
ezimmerm at uiuc.edu
Wed Mar 16 18:45:21 PST 2005
I am fairly new to the LLVM pass framework. My goal is to extend the
CFGPrinter analysis pass to label the edges of the graph with their
edge-counts from profile data.
I can generate the CFGs using 'analyze', but I am having trouble
loading the profile data. I added the line
AU.addRequired<ProfileInfo>(); to the getAnalysisUsage. It is
returning zero for all the edge counts.
In llvm/Analysis/ProfileInfo.h, I noticed a prototype:
Pass *createProfileLoaderPass(const std::string &Filename);
The ProfileInfoLoaderPass does not appear in the list of analyses,
presumably because it is registered as an "Opt". Do I need to
explicitly request a LoaderPass in addition to ProfileInfo? What is
the right way to do this?
More information about the llvm-dev