search for: profileinfoprinter

Displaying 3 results from an estimated 3 matches for "profileinfoprinter".

2010 Feb 26
1
[LLVMdev] Using Profile Information
I have not made a separate pass. I have done it in single pass ie added ProfileLoaderPass , got information in PI and now I am planning to perform the analysis here itself. I was trying to print information using ProfileInfoPrinter pass but was unable to do it. namespace { class MyAna : public ModulePass { ProfileInfo *PI; public: static char ID; // Class identification, replacement for typeinfo MyAna() : ModulePass(&ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesA...
2010 Feb 25
0
[LLVMdev] Using Profile Information
Ah BTW... On 25.02.2010, at 17:33, ambika wrote: > ProfileInfo *PI; > PI = &getAnalysis<ProfileInfo>(); If this _in_ your pass, then you have to register the usage of this in the getAnalysisUsage() method: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<ProfileInfo>(); } Also you have to ensure that the pass you are using is executed right
2010 Feb 25
3
[LLVMdev] Using Profile Information
Hi, How can I use profile information into my pass for performing some analysis. I tried something like: PassManager PassMgr = PassManager(); cl::opt<std::string> ProfileDataFile(cl::Positional, cl::desc("<llvmprof.out file>"), cl::Optional, cl::init("llvmprof.out")); PassMgr.add(createProfileLoaderPass(ProfileDataFile));